digitize: Easy digitizing of vector features within your rstudio...

Description Usage Arguments Note Author(s) Examples

View source: R/tb_digitize.R

Description

digitize is based on the leaflet draw plugin. It provides a bunch of leaflet maps as base layers for digitizing vector features.

Usage

 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
)

Arguments

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

Note

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.

Author(s)

Chris Reudenbach

Examples

 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)

uavRst documentation built on Dec. 30, 2019, 5:06 p.m.