ThinkGeo.com    |     Documentation    |     Premium Support

Overlap method

Is there a method I can call that will return a polygon representing the overlap area of two polygons?  In MapInfo MapBasic, the function is called Overlap.



Peter, 
  
   I can help you there.  In our system Overlaps is a term for computing spatial relationships.  So for example you can ask if PolygonA overlaps PolygonB.  For getting what overlapped we use the term GetIntersection.  You can use it like PolygonA.GetIntersection(PolygonB) and it returns a multi polygon that is the intersection.  Intersection is defined as "The intersection of two Geometries A and B is the set of all points which lie 
 in both A and B."  We use the terms from JTS (Java Topology Suite) which should be the OGC compliant terms for the operations.  Since we use JTS terms a good guide to check out is the PDF link below.  They have pictures and an explanation of terms.  We have the stuff in our documentation but this sums it up quite nicely. 
  
 vividsolutions.com/jts/bin/JTS%20Developer%20Guide.pdf 
  
 David