View source: R/readFeatureLayer.R
readFeatureLayer | R Documentation |
This function reads a (vector) feature layer from a dsn and creates a
simple features dataframe (using package sf
).
readFeatureLayer(dsn, layer, drivers = character(0), crs = NULL)
dsn |
-data source name (interpretation varies by driver) |
layer |
|
drivers |
|
crs |
|
The function uses sf::st_read
to read the feature layer from the dsn.
If crs
is NULL, the coordinate reference system for the layer is unchanged.
to it.
If the layer did not have a coordinate reference system originally associated with it, then
crs
is used to set the sf
object's coordinate reference system.
If the layer has a coordinate reference system associated with it,
wtsGIS::transformCRS
is used to transform/project the sf
object
to that represented by crs
a sf::sf
data.frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.