View source: R/ddbs_ops_unary.R
| ddbs_geometry_type | R Documentation |
Returns the type of each geometry (e.g., POINT, LINESTRING, POLYGON) in the input features.
ddbs_geometry_type(x, by_feature = TRUE, conn = NULL)
x |
Input spatial data. Can be:
Data is returned from this object. |
by_feature |
Logical. If |
conn |
A connection object to a DuckDB database. If |
A factor with geometry type(s)
## Not run:
## load package
library(duckspatial)
## read data
countries_ddbs <- ddbs_open_dataset(
system.file("spatial/countries.geojson",
package = "duckspatial")
)
# option 1: passing sf objects
# Get geometry type for each feature
ddbs_geometry_type(countries_ddbs)
# Get overall geometry type
ddbs_geometry_type(countries_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.