Learn R Programming

cleangeo (version 0.3-1)

clgeo_Clean: clgeo_Clean

Description

Function to clean a spatial data collection

Usage

clgeo_Clean(sp, errors.only = NULL, strategy = "SF", verbose = FALSE)

Value

an object extending the Spatial-class

as defined in sp, with cleaned geometries.

Arguments

sp

object extending the Spatial-class as defined in sp

errors.only

an object of class vector giving the types of errors for which the output should bounded. Default value is NULL (i.e. the output will include features for which both errors and errors were raised.).

strategy

advanced strategy to clean geometries. Default is "SF", alternate values are "POLYGONATION, "BUFFER" (old methods).

verbose

Indicates wether the clean logs have to be printed. Default value is FALSE.

Author

Emmanuel Blondel emmanuel.blondel1@gmail.com

Examples

Run this code
# \donttest{
 require(sf)
 file <- system.file("extdata", "example.shp", package = "cleangeo")
 sf <- sf::st_read(file)
 sp <- as(sf, "Spatial")
 
 sp.clean <- clgeo_Clean(sp)
 report.clean <- clgeo_CollectionReport(sp.clean)
 clgeo_SummaryReport(report.clean)
# }

Run the code above in your browser using DataLab