powered by
Counts the number of geometries, rings, and coordinates found within each feature. As opposed to wk_meta(), this handler will iterate over the entire geometry.
wk_meta()
wk_count(handleable, ...)# S3 method for default wk_count(handleable, ...)wk_count_handler()
# S3 method for default wk_count(handleable, ...)
wk_count_handler()
A geometry vector (e.g., wkb(), wkt(), xy(), rct(), or sf::st_sfc()) for which wk_handle() is defined.
wkb()
wkt()
xy()
rct()
sf::st_sfc()
wk_handle()
Passed to the wk_handle() method.
A data.frame with one row for every feature encountered and columns:
n_geom: The number of geometries encountered, including the root geometry. Will be zero for a null feature.
n_geom
n_ring: The number of rings encountered. Will be zero for a null feature.
n_ring
n_coord: The number of coordinates encountered. Will be zero for a null feature.
n_coord
# NOT RUN { wk_count(as_wkt("LINESTRING (0 0, 1 1)")) wk_count(as_wkb("LINESTRING (0 0, 1 1)")) # }
Run the code above in your browser using DataLab