tillnagel / unfolding

A library to create interactive maps and geovisualizations in Processing and Java
http://unfoldingmaps.org
Other
477 stars 245 forks source link

Centroid of a ShapeMarker with only two locations incorrect #158

Closed tillnagel closed 6 years ago

tillnagel commented 6 years ago

GeoUtils.getCentroid(List) does not work properly with two locations, as area of a line is 0.

As AbstractShapeMarker.getLocation() uses getCentroid this gives NaN, too.

Related to #157