Examples for 'rgeos::gCoverageUnion'


Coverage Union

Aliases: gCoverageUnion

Keywords: spatial

### ** Examples

run <- FALSE
if (require(maptools)) run <- TRUE
Loading required package: maptools
Checking rgeos availability: TRUE
Please note that 'maptools' will be retired by the end of 2023,
plan transition at your earliest convenience;
some functionality will be moved to 'sp'.
if (run) {
    nc1 <- readShapePoly(system.file("shapes/sids.shp", package="maptools")[1],
        proj4string=CRS("+proj=longlat +datum=NAD27"))
}
Warning: readShapePoly is deprecated; use rgdal::readOGR or sf::st_read
if (run) {
    print(system.time(oU <- gUnionCascaded(nc1)))
    if (version_GEOS0() >= "3.8.0") {
        print(system.time(oCU <- gCoverageUnion(nc1)))
    }
}
   user  system elapsed 
  0.025   0.000   0.032 
       user      system     elapsed 
0.006000000 0.000000000 0.005999997 

[Package rgeos version 0.5-9 Index]