Description Usage Arguments Note Author(s) Examples
digitize is based on the leaflet draw plugin. It provides a bunch of leaflet maps as base layers for digitizing vector features.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | digitize(
mapCenter = NULL,
zoom = 15,
line = TRUE,
rectangle = TRUE,
poly = TRUE,
circle = TRUE,
point = TRUE,
remove = TRUE,
position = "topright",
maplayer = c("CartoDB.Positron", "OpenStreetMap", "Esri.WorldImagery",
"Thunderforest.Landscape", "OpenTopoMap"),
overlay = NULL,
features = NULL,
preset = "all",
locPreset = "muf",
cex = 10,
lwd = 2,
alpha = 0.6,
opacity = 0.7
)
|
mapCenter |
c(lat,lon) central point of the leaflet map |
zoom |
initial zoom level |
line |
enable the draw tool line tool |
rectangle |
enable the draw polygon tool |
poly |
enable the draw polygon tool |
circle |
enable the draw circle tool |
point |
enable the draw point tool |
remove |
enable/disable the remove feature of the draw tool |
position |
place to put the toolbar (topright, topleft, bottomright, bottomleft) |
maplayer |
string. as provided by leaflet-provider |
overlay |
optional sp object |
features |
features |
preset |
character. defaut is "NULL" full draw version, "uav" for flightarea digitizing, "ext" for rectangles |
locPreset |
character. default is "muf" for Marburg University Forest, others are "tra" Traddelstein, "hag" Hagenstein, "baw" Bayerwald. |
cex |
cex |
lwd |
lwd |
alpha |
alpha |
opacity |
opacity |
You can either save the digitized object to a JSON
or KML
file to your hard disk. As an alternative you may grab the JSON
string via the clipboard.
Chris Reudenbach
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
##- libs
require(sp)
require(uavRst)
##- preset for digitizing uav flight areas in Meuse
require(sp)
data(meuse)
sp::coordinates(meuse) <- ~x+y
sp::proj4string(meuse) <-sp::CRS("+init=epsg:28992")
me<-sp::spTransform(meuse,CRSobj = sp::CRS("+init=epsg:4326"))
uavRst::digitize(overlay = me)
##- preset for digitizing extents
uavRst::digitize(preset="ext",overlay = me)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.