df_to_sf | R Documentation |
This function will accept a dataframe and turn it into an sf object of class "POLYGON", "LINESTRING" or "POINTS". It can handle PBSMapping polysets or any appropriately structured dataframe.
df_to_sf(
df = NULL,
lat.field = "LATITUDE",
lon.field = "LONGITUDE",
primary.object.field = "PID",
secondary.object.field = "SID",
order.field = "POS",
type = "polys"
)
df |
the default is |
lat.field |
the default is |
lon.field |
the default is |
primary.object.field |
the default is |
secondary.object.field |
the default is |
order.field |
the default is |
type |
the default is |
an sf object
this function was modified from https://github.com/Mar-scal/Assessment_fns/blob/master/Maps/pbs_2_sf.R
Dave Keith Dave.Keith@dfo-mpo.gc.ca, Freya Keyser Freya.Keyser@dfo-mpo.gc.ca and adapted by Mike McMahon Mike.McMahon@dfo-mpo.gc.ca
Other general_use:
DDMMSS_to_DD()
,
DDMMx_to_DD()
,
aggregator()
,
clip_by_poly()
,
combine_lists()
,
df_qc_spatial()
,
df_sf_to_gpkg()
,
drop_cols()
,
prepare_shape_fields()
,
subset_by_time()
,
updateCheck()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.