Check for self intersecting geomety

3933
2
Jump to solution
06-26-2013 09:47 PM
MattCooper
Occasional Contributor
When creating polygon geometry in a sketch layer, we are checking if the geometry "isValid" before saving, but when we try and push this new geometry back to the server via "applyEdits" on the feature layer we get an error about self intersecting polygon boundary.  Is there any simple method to check for this issue with user created polygons?  I assumed that the AGSGeometry isValid method would not consider that valid geometry, but I guess not.

Thanks,
Matt
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
AGSGeometry's isValid method does not check self intersecting geometries. Also, self intersecting geometries are valid (at client side) but server does not accept them. You should always call AGSGeometryEngine's simplifyGeometry on geometry before sending it to server.

Hope this helps!

Regards,
Nimesh

View solution in original post

2 Replies
NimeshJarecha
Esri Regular Contributor
AGSGeometry's isValid method does not check self intersecting geometries. Also, self intersecting geometries are valid (at client side) but server does not accept them. You should always call AGSGeometryEngine's simplifyGeometry on geometry before sending it to server.

Hope this helps!

Regards,
Nimesh
MattCooper
Occasional Contributor
Thanks, that did the trick.
0 Kudos