Select to view content in your preferred language

Geometry complexity and generalization

2348
5
08-22-2014 08:38 AM
JianLiu
Occasional Contributor

This has been bothering me for many days and hope someone here may have an answer.

Is it mandatory to generalize a ("complex") geometry before feeding it to the intersection operation of geometry service? I was told so, but couldn't find any documentation about this. For example, we may have to reduce the number of vertices of a geometry to <250(??)  in order for the intersection to work. But this sounds really strange to me. ArcGIS server cannot even handle geometries over 250 vertices? But I do see intersection doesn't seem to return anything for complex geometries. I am surely missing something. Any advice is much appreciated.

Thanks a ton!

Jian

0 Kudos
5 Replies
BjornSvensson
Esri Regular Contributor

Hi Jian,

No it's not mandatory to generalize before using the intersect operation.

Are you testing with an old server (prior to ArcGIS 10.1)?

Before 10.1, you needed to call "simplify" in case your geometries were not topologically consistent. As of 10.1 the intersect operation will do this for you.

http://resources.arcgis.com/en/help/arcgis-rest-api/#/Intersect/02r3000000sr000000/

0 Kudos
JianLiu
Occasional Contributor

Bjorn,

Thanks for the reply. Yes, I am using ArcGIS 10.0.

So "simplify" is only necessary to clean any inconsistent topology (self intersecting polygon etc.). Otherwise, the intersection should work with any topologically sound geometry? 

I am intersecting a "donut" polygon with a point layer to select points falling within the donut shape. I know there are points within the donut, however, the intersection doesn't return anything. Do you know what problem this might be? Do you think the drawing order of the vertices might cause a problem? (say topologically the outline polygon should be clockwise while the inner one should be counter clockwise. And when I passing in the arrays, they could be in the same direction and it's topographically wrong? ) 

I will test simplifying first before intersecting and see what happens. And I will appreciate any insight into this. Particularly, when I visualize the donut polygon, it looks fine. Also I've calculated perimeter and area of the donut polygon using geometry service. The perimeter looks right, but the polygon area is Strange.

Thanks,

Jian 

0 Kudos
BjornSvensson
Esri Regular Contributor

Yes, my guess is that incorrect drawing order would need to be fixed, for example with "simplify".

0 Kudos
JianLiu
Occasional Contributor

Bjorn,

I've tested simplifying the donut polygon before intersecting, but still the same result -- returns nothing.

In fact, I am not using geometryservice.intersect. I use FeatureLayer.queryFeatures(query,..) and query.spatialRelationship = "esriSpatialRelIntersects". I assume simplify is also required before using this spatial query? Any other thing you might think of that could cause this (no points returned even though they are there)?

Thank you and it's much appreciated. 

0 Kudos
BjornSvensson
Esri Regular Contributor

It could be the data or the version of ArcGIS Server.  So some things to test:

  • does it work with a more recent version of ArcGIS Server?
  • does it work with other layers?

You could probably use http://sampleserver6.arcgisonline.com/arcgis/rest/services/ to test this.

0 Kudos