View source: R/readShapefile.R
| readShapefile | R Documentation |
This function reads a shapefile and creates a sf spatial dataframe object.
readShapefile(file, crs = NULL)
file |
|
crs |
|
The function uses sf::st_read() to read the shapefile.
If crs is NULL, the coordinate reference system for the shapefile is unchanged.
If the shapefile 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 shapefile has a coordinate reference system associated with it,
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.