drawPolygon: Create the polygon for the study area by drawing into a world...

View source: R/makeGrid.r

drawPolygonR Documentation

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

Description

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

Usage

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()
}

Greensway/BIRDS documentation built on Oct. 19, 2023, 2:35 a.m.