map_wkt: Map WKT geometry (points and polygons)

View source: R/map_wkt.R

map_wktR Documentation

Map WKT geometry (points and polygons)

Description

'map_wkt()' takes a well-known text (WKT) geometry column and maps points and polygons onto a gray leaflet map. All NA geometry is dropped before mapping.

Usage

map_wkt(
  df,
  wellknowntext = "footprintWKT",
  type = "all",
  remove.duplicates = TRUE
)

Arguments

df

- The name of the data frame that contains WKT geometry.

wellknowntext

- The name of the specific column within the data frame that contains the WKT geometry. This parameter is currently not fully implemented and defaults to the Darwin Core 'footprintsWKT'.

type

- Pick one from "points", "polygons", or "all" to map specific geometry types.

remove.duplicates

- Boolean (TRUE or FALSE). Whether or not to remove identical geometries before plotting.

Details

Define your dataframe, the column that contains WKT, and an option to map specific geometry types.

Value

The function returns a dynamic, zoomable leaflet map with the specific geometry plotted.

Examples

## Not run: 
#map species observations
map_wkt(my_NPS_species_obs)

#map species observations - points only
map_wkt(my_NPS_species_obs, wellknowntext = "footprintWKT", type = "points")

## End(Not run)

nationalparkservice/DSTools documentation built on March 29, 2025, 10:54 p.m.