convert_df_to_sf | R Documentation |
This function converts a data.frame to a simple features (sf) object.
convert_df_to_sf(df, lon = "lon", lat = "lat", crs_from = 4326, crs_to = 3035)
df |
data.frame containing longitude and latitude columns |
lon |
column name for longitude values (default: "lon"). |
lat |
column name for latitude values (default: "lat"). |
crs_from |
crs of the original coordinate system (default: 4326). |
crs_to |
crs of the target coordinate system (default: 3035). |
Returns an sf object with the specified coordinate reference system.
Martin Haringa
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.