Check for self-intersecting polyline

1063
4
11-29-2017 02:05 AM
AlexPleyer
New Contributor II

Hi,

I want to do something very simple with the ArcGIS Javascript API 3.x. Just check if a polyline is self-intersecting.

Is there anything else than getLineIntersection() or the GeometryService function Intersect() because both require me to iterate through the paths arrays and check each line part myself.

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Alex,

  Have you tried GeometryEngine.isSimple method it should return false if the polyline self-intersects.

0 Kudos
AlexPleyer
New Contributor II

Hi Robert,

yes I tried that, it always returns true, regardless of self-intersection or not.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Alex,

   Then, No there is no other way.

AlexPleyer
New Contributor II

Ok thank you for your help. Doing it manually now.

0 Kudos