Creates an interactive map for a dilineated polygon. The survey locations and settlement types may optionall be specified, which will be filtered to the relevant area for the polygon.

display_polygon(shp_path, survey_points = NULL,
  settlement_point = NULL)

Arguments

shp_path

the filepath of the shapefile

survey_points

A SpatialPointsDataFrame containing the survey locations

settlement_point

A SpatialPointsDataFrame containing the settlement type

Value

An HTML map created by the leaflet package.

Details

Note, the shapefiles are specified by a filepath only, while the survey and settlement points must be loaded into the memory. While this may appear inconsistent, it makes it easier to run this function for each individual shapefile when a list of maps is required.

Examples

# Find file path to example plot poly_path <- system.file("extdata/polygons/001_js_polygon.shp", package = "polyCheck") # Display the output Map display_polygon(poly_path)