Get maximum y coordinate
st_ymax.Rd
This function returns the maximum y coordinate of the geometries in the specified dbSpatial
object.
Usage
st_ymax(dbSpatial, geomName = "geom", ...)
# S4 method for class 'dbSpatial'
st_ymax(dbSpatial, geomName = "geom", ...)
Examples
# Create a data.frame with x and y coordinates and attributes
coordinates <- data.frame(x = c(100, 200, 300), y = c(500, 600, 700))
attributes <- data.frame(id = 1:3, name = c("A", "B", "C"))
# Combine the coordinates and attributes
dummy_data <- cbind(coordinates, attributes)
# Create a duckdb connection
con = DBI::dbConnect(duckdb::duckdb(), ":memory:")
# Create a duckdb table with spatial points
db_points = dbSpatial(conn = con,
value = dummy_data,
x_colName = "x",
y_colName = "y",
name = "foo",
overwrite = TRUE)
st_extent(dbSpatial = db_points)
#> xmin xmax ymin ymax
#> 100 300 500 700
st_ymax(dbSpatial = db_points)
#> [1] 700