library(rgeos)
ls("package:rgeos") %>% .[grep("^g[A-Z]", .)]
## [1] "gArea" "gBinarySTRtreeQuery"
## [3] "gBoundary" "gBuffer"
## [5] "gCentroid" "gContains"
## [7] "gContainsProperly" "gConvexHull"
## [9] "gCoveredBy" "gCovers"
## [11] "gCrosses" "gDelaunayTriangulation"
## [13] "gDifference" "gDisjoint"
## [15] "gDistance" "gEnvelope"
## [17] "gEquals" "gEqualsExact"
## [19] "gInterpolate" "gIntersection"
## [21] "gIntersects" "gIsEmpty"
## [23] "gIsRing" "gIsSimple"
## [25] "gIsValid" "gLength"
## [27] "gLineMerge" "gNearestPoints"
## [29] "gNode" "gOverlaps"
## [31] "gPointOnSurface" "gPolygonize"
## [33] "gProject" "gRelate"
## [35] "gSimplify" "gSymdifference"
## [37] "gTouches" "gUnarySTRtreeQuery"
## [39] "gUnaryUnion" "gUnion"
## [41] "gUnionCascaded" "gWithin"
## [43] "gWithinDistance"
class(sp_quakes)
## [1] "SpatialPointsDataFrame"
## attr(,"package")
## [1] "sp"
ch <- gConvexHull(sp_quakes)
class(ch)
## [1] "SpatialPolygons"
## attr(,"package")
## [1] "sp"
plot(sp_quakes, col = "blue")
plot(ch, add = TRUE)
africa <- readOGR("../FOSSGIS-workshop/data/africa.js")
## OGR data source with driver: GeoJSON
## Source: "../FOSSGIS-workshop/data/africa.js", layer: "OGRGeoJSON"
## with 54 features
## It has 65 fields
sp::spplot(africa, "LABELRANK", scales = list(draw = TRUE))
gUnionCascaded(africa) %>% plot(col = "blue")