| ddbs_coord_bounds | R Documentation |
Returns the minimum or maximum value of a specific coordinate axis across
all points of a geometry. When by_feature = TRUE (default), a value
is computed per row. When by_feature = FALSE, a single global
value is returned for the entire dataset.
ddbs_xmax(
x,
new_column = "xmax",
by_feature = TRUE,
conn = NULL,
name = NULL,
mode = NULL,
overwrite = FALSE,
quiet = FALSE
)
ddbs_xmin(
x,
new_column = "xmin",
by_feature = TRUE,
conn = NULL,
name = NULL,
mode = NULL,
overwrite = FALSE,
quiet = FALSE
)
ddbs_ymax(
x,
new_column = "ymax",
by_feature = TRUE,
conn = NULL,
name = NULL,
mode = NULL,
overwrite = FALSE,
quiet = FALSE
)
ddbs_ymin(
x,
new_column = "ymin",
by_feature = TRUE,
conn = NULL,
name = NULL,
mode = NULL,
overwrite = FALSE,
quiet = FALSE
)
ddbs_zmax(
x,
new_column = "zmax",
by_feature = TRUE,
conn = NULL,
name = NULL,
mode = NULL,
overwrite = FALSE,
quiet = FALSE
)
ddbs_zmin(
x,
new_column = "zmin",
by_feature = TRUE,
conn = NULL,
name = NULL,
mode = NULL,
overwrite = FALSE,
quiet = FALSE
)
ddbs_mmax(
x,
new_column = "mmax",
by_feature = TRUE,
conn = NULL,
name = NULL,
mode = NULL,
overwrite = FALSE,
quiet = FALSE
)
ddbs_mmin(
x,
new_column = "mmin",
by_feature = TRUE,
conn = NULL,
name = NULL,
mode = NULL,
overwrite = FALSE,
quiet = FALSE
)
x |
Input spatial data. Can be:
Data is returned from this object. |
new_column |
Name of the new column. Defaults to the lowercase function
name (e.g. |
by_feature |
Logical. If |
conn |
A connection object to a DuckDB database. If |
name |
A character string of length one specifying the name of the table,
or a character string of length two specifying the schema and table
names. If |
mode |
Character. Controls the return type. Options:
Can be set globally via |
overwrite |
Boolean. whether to overwrite the existing table if it exists. Defaults
to |
quiet |
A logical value. If |
ddbs_xmax() / ddbs_xmin(): maximum / minimum X coordinate.
ddbs_ymax() / ddbs_ymin(): maximum / minimum Y coordinate.
ddbs_zmax() / ddbs_zmin(): maximum / minimum Z coordinate.
ddbs_mmax() / ddbs_mmin(): maximum / minimum M (measure) coordinate.
When by_feature = FALSE, the result is always a single numeric
scalar representing the global extreme across the entire dataset.
by_feature = TRUE and mode = "duckspatial" (default):
A duckspatial_df.
by_feature = TRUE and mode = "sf": A numeric vector.
by_feature = FALSE: A single numeric scalar.
When name is provided: writes the table in DuckDB and
returns TRUE (invisibly).
## Not run:
library(duckspatial)
argentina_ddbs <- ddbs_open_dataset(
system.file("spatial/argentina.geojson", package = "duckspatial")
)
## per-feature X extent (default)
ddbs_xmax(argentina_ddbs)
ddbs_xmin(argentina_ddbs)
## global bounding values
ddbs_xmax(argentina_ddbs, by_feature = FALSE)
ddbs_ymin(argentina_ddbs, by_feature = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.