clgeo_Clean {cleangeo} R Documentation

## clgeo_Clean

### Description

Function to clean a spatial data collection

### Usage

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


### 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.). At now, this argument accepts the error type "ORPHANED_HOLE". strategy advanced strategy to clean geometries. Default is "POLYGONATION", alternate value is "BUFFER" (old method). verbose Indicates wether the clean logs have to be printed. Default value is FALSE.

### Value

an object extending the Spatial-class as defined in sp, with cleaned geometries.

### Note

About cleaning strategy: The polygonation method is a tentative alternate method to triangulation to clean geometries and to the classical often used 'buffer' approach. In the polygonation method, triangulation is skipped and a re-polygonation intuitive algorithm is applied to rebuild the source invalid geometry into one or more valid polygonal geometries.

### Author(s)

Emmanuel Blondel emmanuel.blondel1@gmail.com

### Examples


require(maptools)
file <- system.file("extdata", "example.shp", package = "cleangeo")