A wkpool participates in wk's CRS propagation model: the CRS is an
opaque object carried in an attribute, never interpreted, and checked
for equality when pools are combined. Likewise the geodesic flag
records whether segments should be interpreted as geodesics when
coordinates are spherical. Both are captured from the input by
establish_topology(), survive subsetting, merging and compaction,
and are restored onto geometry produced by segments_to_wkt(),
arcs_to_wkt(), cycles_to_wkt() and their WKB counterparts.
Usage
# S3 method for class 'wkpool'
wk_crs(x)
# S3 method for class 'wkpool'
wk_set_crs(x, crs)
# S3 method for class 'wkpool'
wk_is_geodesic(x)
# S3 method for class 'wkpool'
wk_set_geodesic(x, geodesic)Value
wk_crs(): the CRS object, orNULL.wk_set_crs(),wk_set_geodesic():xwith the attribute replaced.wk_is_geodesic():TRUE,FALSE, orNA.
Examples
x <- wk::wkt("LINESTRING (0 0, 1 1)", crs = "EPSG:4326")
pool <- establish_topology(x)
wk::wk_crs(pool)
#> [1] "EPSG:4326"
wk::wk_crs(wk::wk_set_crs(pool, "EPSG:3031"))
#> [1] "EPSG:3031"