Select to view content in your preferred language

Check for self-intersecting polyline

1294
4
11-29-2017 02:05 AM
AlexPleyer
Occasional Contributor

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
Occasional Contributor

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
Occasional Contributor

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

0 Kudos