Skip to content
Prev 24035 / 29559 Next

Intersect shapefiles

On Thu, 18 Feb 2016, Worrall, James -FS wrote:

            
Please feel free to contribute; the description section shall be short, 
what you seem to want is in the details a little further down the page:

"Returns an sp object with intersecting geometries merged. If geometries 
do not intersect then both are returned as distinct subgeometries."

Note that gUnion is a binary operator (union of two objects) while 
gUnaryUnion is a unary operator with an id argument to map input 
subgeometries to output subgeometries.

I guess this is easier to grasp than the JTS original describing the 
binary union operator: "Computes a Geometry representing all the points in 
this Geometry and other" at

http://www.vividsolutions.com/jts/javadoc/com/vividsolutions/jts/geom/Geometry.html#union%28com.vividsolutions.jts.geom.Geometry%29

Roger