AnsweredAssumed Answered

ImmutablePart::getEndPoint doesn’t return the last point

Question asked by henrou on Feb 16, 2017
Latest reply on Feb 17, 2017 by henrou

Hi,

 

The last point when iterating over the points in an ImmutablePart is not the point returned in getEndPoint() on that same ImmutablePart. See my example below. Why is that? I'm on ArcGIS Runtime for Android 100.0.0.

private void partTest(ImmutablePart part) {
   for (int i = 0; i < part.getPointCount(); i++) {
      Point p = part.getPoint(i);
      System.out.println(i + " - " + p.getX() + ", " + p.getY());
   }

   Point startPoint = part.getStartPoint();
   System.out.println("Start point - " + startPoint.getX() + ", " + startPoint.getY());

   Point endPoint = part.getEndPoint();
   System.out.println("End point - " + endPoint.getX() + ", " + endPoint.getY());
}

 

Printouts when running the above with a ImmutablePart over Stockholm:

I/System.out: 0 - 2000955.7131845958, 8217577.284820005
I/System.out: 1 - 1989299.2266646507, 8248738.619869451
I/System.out: 2 - 2011153.6917361675, 8252952.245694454
I/System.out: Start point - 2000955.7131845958, 8217577.284820005
I/System.out: End point - 1989299.2266646507, 8248738.619869451

 

Regards

Henrik

Outcomes