Select to view content in your preferred language

Issue to get subcurve from polyline, GeometryEngine.intersect

1113
0
08-03-2016 10:58 AM
thejuskambi
Regular Contributor

I am experiencing a strange behaviour, I am using GeometryEngine to find if a point is on the line. I am using intersect for that purpose. If it intersect i.e., point is on the Polyline, Then I get the subcurve, segments from start to the point. With the coordinates mentioned below, the GeometryEngine returns that the point is on the line, whereas, when I try to identify, where the point lies (using calculations), I find that the point is not on the line and I get the full line back.

Polyline:
{
    'paths':[[[558282.4414999997,446456.8780000005],
            [558289.2401999999,445685.57799999974],
            [558286.9896,445626.9844000004],
            [558289.9265000001,445561.07840000093],
            [558293.3940000003,444489.8770000003]]],
    'spatialReference':{'wkid':3071,'latestWkid':3071}
}
Point:
{
    'x':558287.5473275795,
    'y':445877.7059446493,
    'spatialReference':{'wkid':3071}
}

The simplified code is here.

Can anyone let me know if there is a tolerance limit in the GeometryEngine which results in the wrong response. Or how I can Identify if a point is on a polyline?

Tags (1)
0 Kudos
0 Replies