coordinates_to_point | R Documentation |
From the coordinates defined in fields such as latitude and longitude, it returns a layer of points.
coordinates_to_point(table, lon_lat = c("intptlon", "intptlat"), crs = NULL)
table |
A |
lon_lat |
A vector, name of longitude and latitude attributes. |
crs |
A coordinate reference system: integer with the EPSG code, or character with proj4string. |
If we start from a geographic layer, it initially transforms it into a table.
The CRS of the new layer is indicated. If a CRS is not indicated, it considers the layer's CRS by default and, if it is not a layer, it considers 4326 CRS (WGS84).
A sf
object.
us_state_point <-
coordinates_to_point(us_layer_state,
lon_lat = c("INTPTLON", "INTPTLAT"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.