Skip to content

Polyline2D calculate distance doesn't work properly #13

Closed
@vocedar

Description

@vocedar

When I calculating the distance using Polyline2D.distance().


ArrayList<Point2D> listPoint= new ArrayList<>();
listPoint.add(new Point2D(201093.16610711772, 1777477.3696508463)); // UTM Easting and Northing converted from lat,lng
listPoint.add(new Point2D(202667.84818503872, 1777673.8963489647));

Polyline2D polyline = Polyline2D.create(listPoint);
Point2D currentPoint = new Point2D(201926.0433899812, 1777926.9596233366);

double distance = polyline.distance(currentPoint);

Result is not correct.
But when I divided each coordinate by 1000, the result seem correct.
Is there any issue or I just missing somethings?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions