# Functions to Detect Spatial Conflicts

**URL:** <https://community.thinkgeo.com/t/functions-to-detect-spatial-conflicts/5489>\
**Category:** WebForms\
**Created:** [September 22, 2010, 1:37pm UTC](https://community.thinkgeo.com/t/functions-to-detect-spatial-conflicts/5489 "2010-09-22T13:37:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wilson](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/w/96bed5/32.png) [@Wilson](https://community.thinkgeo.com/u/Wilson)\
**Post date:** [September 22, 2010, 1:37pm UTC](https://community.thinkgeo.com/t/functions-to-detect-spatial-conflicts/5489/1 "2010-09-22T13:37:58Z")

</div>

Hi,

Does&nbsp;anybody&nbsp;know&nbsp;if&nbsp;we&nbsp;have&nbsp;any&nbsp;functions&nbsp;to&nbsp;detect&nbsp;spatial&nbsp;conflicts?&nbsp;For&nbsp;example,&nbsp;one&nbsp;area&nbsp;is&nbsp;overlapping&nbsp;another&nbsp;area.

Thanks,

Wilson&nbsp;Jiang

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [September 23, 2010, 8:45am UTC](https://community.thinkgeo.com/t/functions-to-detect-spatial-conflicts/5489/2 "2010-09-23T08:45:55Z")

</div>

&nbsp;

Hi&nbsp;Wison,  
To&nbsp;check&nbsp;whether&nbsp;there&nbsp;are&nbsp;other&nbsp;shapes&nbsp;in&nbsp;the&nbsp;area&nbsp;of&nbsp;another&nbsp;shape,&nbsp;I&nbsp;think&nbsp;we&nbsp;can&nbsp;check&nbsp;the&nbsp;intersection&nbsp;between&nbsp;two&nbsp;shapes.&nbsp;Here&nbsp;as&nbsp;following&nbsp;is&nbsp;the&nbsp;demo&nbsp;code:  
&nbsp;  
`BaseShape shape1 = BaseShape.CreateShapeFromWellKnownData("POLYGON((10 60,40 70,30 85, 10 60))");BaseShape shape2 = BaseShape.CreateShapeFromWellKnownData("LINESTRING(60 60, 70 70,75 60, 80 70, 85 60,95 80)");// check the conflict between shapesbool isIntersected = shape1.Intersects(shape2);`  
  
Also&nbsp;you&nbsp;can&nbsp;refer&nbsp;to&nbsp;the&nbsp;installation&nbsp;sample&nbsp;“Samples/&nbsp;QueryingFeatureLayers/&nbsp;SpatialQueryAFeatureLayer.aspx”&nbsp;for&nbsp;detail.  
&nbsp;  
Thanks,  
Johnny  
&nbsp;
