Javascript app with draw class - disallow self-intersecting polygons?

391
0
07-18-2018 02:40 PM
AllenScully
Occasional Contributor III

We have a Javascript app that allows users to draw a polygon as an area of interest to be notified for development activity.  

The data gets written to a non-spatial table that is then converted, using GeoEvent, to a regular feature class using a field calculator on the geometry attribute.

In the rare cases where someone draws a self-intersecting polygon, this blows up our process - geoevent essentially can't get past the bad record.

Our process is fairly locked in at this point, so we are hoping to add code in the Javascript app to prevent these types of polygon from being drawn at all.  

We're using esri/toolbars/draw (3.25 - this is a large application from github so we have not built it from scratch and are not excited about totally re-working it for 4.x) - and I noticed the setRespectDrawingVertexOrder method which says it sets whether the polygon geometry should be modified to be topologically correct.

My question is, will this handle the issue of self-intersecting polygons (i.e. do they count as topologically incorrect) and if so, what does the user see when this is enforced?

Thanks - 

Allen

0 Kudos
0 Replies