Learn R Programming

cleangeo (version 0.2-3)

clgeo_Clean: 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.

Examples

Run this code
# NOT RUN {
 require(maptools)
 file <- system.file("extdata", "example.shp", package = "cleangeo")
 sp <- readShapePoly(file)
 
 sp.clean <- clgeo_Clean(sp)
 report.clean <- clgeo_CollectionReport(sp.clean)
 clgeo_SummaryReport(report.clean)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab