I have a polygon feature layer and a polygon geometry. How do I find out if the feature layer contains the polygon, as in exact shape of the polygon?

I did see the geometry engine, but that doesn't contain a method for knowing if exact shape exists at same place. Both datasets have same spatial reference.

1 Answer 1


You could create a QueryTask on the layer, and specify the geometry of the polygon in the Query's geometry clause and a SPATIAL_REL_INTERSECTS for the query type.

This would return any geometries from the layer which intersect with the polygon.

You could then examine those to see whether they had matching start/end coordinates, number of vertices, etc. Or convert each polygon to JSON and compare with the original polygon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.