display_polygon: Displays a delineated polygon in an interactive map

Description Usage Arguments Details Value Author(s) Examples

Description

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.

Usage

1
2
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

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.

Value

An HTML map created by the leaflet package.

Author(s)

Michael Harper

Examples

1
2
3
4
5
6
# 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)

GRID3/polyCheck documentation built on May 26, 2019, 8:35 a.m.