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. See bind if you want to combine polygons without intersection.
Single SpatialPolygons* object. Overlapping polygons are intersected. Original attributes are lost. New attributes allow for determining how many, and which, polygons overlapped.
Union for SpatialLines and SpatialPoints simply combines the two data sets; without any geometric intersections. This is equivalent to bind.
methods
## S4 method for signature 'Extent,Extent'union(x, y)## S4 method for signature 'SpatialPolygons,SpatialPolygons'union(x, y)## S4 method for signature 'SpatialPolygons,missing'union(x, y)## S4 method for signature 'SpatialLines,SpatialLines'union(x, y)## S4 method for signature 'SpatialPoints,SpatialPoints'union(x, y)
Arguments
x: Extent or SpatialPolygons* object
y: Same as x or missing
Returns
Extent or SpatialPolygons object
See Also
intersect, extent, setExtent
merge for merging a data.frame with attributes of Spatial objects and +,SpatialPolygons,SpatialPolygons-method for an algebraic notation