Description Usage Arguments Value Examples
View source: R/engine-proj-sf.R
The PROJ sf engine is a thin wrapper around sf::st_transform()
using sf::sf_proj_pipelines()
to query the most appropriate transformation.
The interface is similar to that of crs_engine_proj_cmd()
to allow a
drop-in replacement for most use-cases.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | crs_engine_proj_sf(authority_compliant = TRUE, spatial_test = "intersects")
crs_has_proj_sf()
## S3 method for class 'crs2crs_engine_proj_sf'
crs_engine_proj_pipeline(
engine,
handleable,
crs_to,
crs_from = wk::wk_crs(handleable),
bbox = wk::wk_bbox(handleable),
...
)
## S3 method for class 'crs2crs_engine_proj_sf'
crs_engine_proj_pipeline_apply(engine, handleable, pipeline, ...)
## S3 method for class 'crs2crs_engine_proj_sf'
crs_engine_transform(
engine,
handleable,
crs_to,
crs_from = wk::wk_crs(handleable),
...
)
|
authority_compliant |
Use |
spatial_test |
Use "none" to skip querying coordinate operations based
on |
engine |
A transform engine such as |
handleable |
A geometry vector (e.g., |
crs_to |
Source and destination coordinate reference systems |
crs_from |
Source and destination coordinate reference systems |
bbox |
The optional bounding box of the object.
Defaults to |
... |
engine-specific transformation options |
pipeline |
A PROJ coordinate transformation pipeline definition |
crs_engine_proj_sf()
returns an engine that can be used to transform coordinates
1 2 3 4 5 6 7 | if (crs_has_proj_sf()) {
engine <- crs_engine_proj_sf()
crs_transform(
wk::xy(-64, 45, crs = "OGC:CRS84"), "EPSG:3857",
engine = engine
)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.