Description Usage Arguments Value See Also Examples
Extent objects: Objects are combined into their union. See crop
and extend
to union a Raster object with an Extent object.
Two SpatialPolygons* objects. Overlapping polygons (between layers, not within layers) are intersected, other spatial objects are appended. Tabular attributes are joined.
Single SpatialPolygons* object. Overlapping polygons are intersected. Original attributes are lost. New attributes allow for determining how many, and which, polygons overlapped.
1 2 3 4 5 6 7 8 |
x |
Extent or SpatialPolygons* object |
y |
Same as |
Extent or SpatialPolygons object
merge
for merging a data.frame with attributes of Spatial objects
and +,SpatialPolygons,SpatialPolygons-method
for an algebraic notation
1 2 3 4 5 6 7 8 9 10 11 12 13 | e1 <- extent(-10, 10, -20, 20)
e2 <- extent(0, 20, -40, 5)
union(e1, e2)
#SpatialPolygons
if (require(rgdal) & require(rgeos)) {
p <- shapefile(system.file("external/lux.shp", package="raster"))
p0 <- aggregate(p)
b <- as(extent(6, 6.4, 49.75, 50), 'SpatialPolygons')
projection(b) <- projection(p)
u <- union(p0, b)
plot(u, col=2:4)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.