symdif: Symetrical difference

Description Usage Arguments Value See Also Examples

Description

Symetrical difference of SpatialPolygons* objects

Usage

1
2
## S4 method for signature 'SpatialPolygons,SpatialPolygons'
symdif(x, y, ...)

Arguments

x

SpatialPolygons* object

y

SpatialPolygons* object

...

Additional SpatialPolygons* object(s)

Value

SpatialPolygons*

See Also

erase

Examples

1
2
3
4
5
6
7
8
#SpatialPolygons
if (require(rgdal) & require(rgeos)) {
	p <- shapefile(system.file("external/lux.shp", package="raster"))
	b <- as(extent(6, 6.4, 49.75, 50), 'SpatialPolygons')
	crs(b) <- crs(p)
	sd <- symdif(p, b)
	plot(sd, col='red')
}

raster documentation built on Jan. 5, 2021, 3:01 a.m.