Description Usage Arguments Value Examples
The geovctrs package works with spatial reference identifiers instead of actual CRS objects so that the heavy lifting can be implemented in other packages. However, most geometry formats can store an integer spatial reference identifier (SRID) with each feature to propagate this information through calculations.
1 2 3 4 5 6 7 8 9 10 11 | geo_srid(x)
## Default S3 method:
geo_srid(x)
geo_set_srid(x, srid)
## Default S3 method:
geo_set_srid(x, srid)
as_geo_srid(x)
|
x |
A geometry-like object, or one that can be
coerced to a geometry-like object using |
srid |
A spatial reference identifier, coerced to
an integer by |
An integer vector (one SRID per feature).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # two points with an SRID
geometries <- wkt(
c(
"SRID=26920;POINT (259473 4876249)",
"SRID=4326;POINT (-66 44)"
)
)
geo_srid(geometries)
geo_srid(geo_set_srid(geometries, NA))
# SRIDs are propogated through conversions,
# or discarded with a warning
geo_srid(as_wkb(geometries))
geo_srid(as_geo_xy(geometries))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.