1# Author: Robert J. Hijmans
2# Date : November 2011
3# Version 1.0
4# Licence GPL v3
5
6
7setMethod("+", signature(e1='SpatialPolygons', e2='SpatialPolygons'),
8    function(e1, e2){
9		union(e1, e2)
10	}
11)
12
13setMethod("*", signature(e1='SpatialPolygons', e2='SpatialPolygons'),
14    function(e1, e2){
15		intersect(e1, e2)	}
16)
17
18setMethod("-", signature(e1='SpatialPolygons', e2='SpatialPolygons'),
19    function(e1, e2){
20		erase(e1, e2)
21	}
22)
23
24#setMethod("^", signature(e1='SpatialPolygons', e2='SpatialPolygons'),
25#    function(e1, e2){
26#		crop(e1, e2)
27#	}
28#)
29
30setMethod("+", signature(e1='SpatialPoints', e2='SpatialPoints'),
31    function(e1, e2){
32		bind(e1, e2)
33	}
34)
35
36setMethod("+", signature(e1='SpatialLines', e2='SpatialLines'),
37    function(e1, e2){
38		bind(e1, e2)
39	}
40)
41