powered by
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 )
A modified shapefile with user-edited features.
A shapefile (sf object) that can be created with shapefile_input().
sf
shapefile_input()
Optionally, a mosaic (SpatRaster) to be displayed as a background.
An optional mapview object.
mapview
Red band index for RGB display (default is 3).
Green band index for RGB display (default is 2).
Blue band index for RGB display (default is 1).
Maximum number of pixels for down-sampling the mosaic (default is 3e6).
if (interactive() && requireNamespace("EBImage")) { library(pliman) shp <- shapefile_input(system.file("ex/lux.shp", package="terra")) edited <- shapefile_edit(shp) }
Run the code above in your browser using DataLab