Learn R Programming

cleangeo (version 0.2-3)

clgeo_IsValid: clgeo_IsValid

Description

Wrapper method to try performing rgeos::gIsValid call and catch eventual warnings or errors (in particular GEOS exceptions).

Usage

clgeo_IsValid(sp, verbose = FALSE)

Arguments

sp

object extending the Spatial-class as defined in sp

verbose

object of class "logical". Default value is FALSE.

Value

an object of class "logical". TRUE if valid, FALSE otherwise

Examples

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

Run the code above in your browser using DataLab