Create the polygon for the study area by drawing into a world map

drawPolygon(lat = 0, lng = 0, zoom = 1, editor = "leafpm")

Arguments

lat

initial geographical coordinate for latitude in decimal degrees (EPSG:4326) for the map to start at. Default = “0”.

lng

initial geographical coordinate for longitude in decimal degrees (EPSG:4326) for the map to start at. Default = “0”.

zoom

initial zoom level for the map. Range 1 - 19. Default = “1”.

editor

type of editor for the drawing tools. Options are “leafpm” (default) and “leaflet.extras”. Requires additional packages leafpm and leaflet.extras, respectively.

Value

an object of class ‘sf’ with a polygon (only the first one drawn) with geodesic coordinates in WGS84 (ESPG:4326).

Examples

if(interactive()){ polygon <- drawPolygon() }