0

I'm developing a webgis using ArcGIS Silverlight API 3.1 . I used esri interactive SDK sample for spatial query in the webgis .The problem is when i draw a freehand polygon and the polygon intersect itself (fig1), the error "Query failed: Error code '400':unable to complete operation." raised (fig2) . How can i solve the problem ?

fig1 fig2

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jun 11, 2014 at 4:42
0

1 Answer 1

2

I'm not an expert in Silverlight, the way to fix the geometry is to simplify it. Use ITopologicalOperator5, set the isknownsimple to false and then call simplify which will return a geometry with multiple parts - in this case 3 parts.

answered Jun 11, 2014 at 5:04
4
  • Thanks Michael but we can't use Arcobject in silverlight API Commented Jun 11, 2014 at 6:08
  • That's a bummer. Do you have try..catch blocks in silverlight? Commented Jun 11, 2014 at 21:33
  • The problem is that it can't solve query result.I don't have any result. Commented Jun 12, 2014 at 3:59
  • That's true. But if your API can't handle non-simple geometries the only solution is to try..catch and return an error message. Ideally your API could fix it and solve the query but it appears that's not possible because you can't access low-level objects. Commented Jun 12, 2014 at 4:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.