View source: R/utils_shapefile.R
shapefile_edit | R Documentation |
This function allows you to interactively edit features in a shapefile using the mapedit package.
shapefile_edit(
shapefile,
mosaic = NULL,
basemap = NULL,
r = 3,
g = 2,
b = 1,
max_pixels = 3e+06
)
shapefile |
A shapefile ( |
mosaic |
Optionally, a mosaic (SpatRaster) to be displayed as a background. |
basemap |
An optional |
r |
Red band index for RGB display (default is 3). |
g |
Green band index for RGB display (default is 2). |
b |
Blue band index for RGB display (default is 1). |
max_pixels |
Maximum number of pixels for down-sampling the mosaic (default is 3e6). |
A modified shapefile with user-edited features.
if(interactive()){
library(pliman)
shp <- shapefile_input(system.file("ex/lux.shp", package="terra"))
edited <- shapefile_edit(shp)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.