Select an extent interactively from a leaflet map

select_extent(in_object = NULL, reproject = TRUE, transparency = 0.5)

Arguments

in_object

a R spatial object of any kind supported by mapview ("Raster", "sp", "sf") to be shown as reference on the map (see examples). If NULL, an empty map of the world is shown, Default: NULL

reproject

logical If TRUE, and a valid in_object was provided, the selected extent is returned in the same CRS of in_object, otherwise it is returned in CRS 4326

transparency

PARAM_DESCRIPTION, Default: 0.5

Value

a sprawlext object representing the selected extent.

Details

DETAILS

Examples

# NOT RUN {
if(interactive()){
 in_rast <- read_rast(system.file("extdata/REYE_test", "REYE_2016_185_gNDVI.tif",
                          package = "sprawl.data"))
 extent    <- select_extent(in_rast)
 extent
 }

# }