# Overlap method

**URL:** <https://community.thinkgeo.com/t/overlap-method/844>\
**Category:** WinForms\
**Created:** [November 16, 2009, 9:57am UTC](https://community.thinkgeo.com/t/overlap-method/844 "2009-11-16T09:57:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter6](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/p/e5b9ba/32.png) [@Peter6](https://community.thinkgeo.com/u/Peter6)\
**Post date:** [November 16, 2009, 9:57am UTC](https://community.thinkgeo.com/t/overlap-method/844/1 "2009-11-16T09:57:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![David](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@David](https://community.thinkgeo.com/u/David)\
**Post date:** [November 16, 2009, 11:08am UTC](https://community.thinkgeo.com/t/overlap-method/844/2 "2009-11-16T11:08:58Z")

</div>

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