douglas-peucker

Simplify-Java (by hgoebl) Issue With Reduced Points List Always Size 2

人盡茶涼 提交于 2020-01-14 09:49:06
问题 I am trying to implement the reduction algorithim from https://github.com/hgoebl/simplify-java I have looked through his test code and tried to come up with what I think is the right logic. I am taking a list of Location objects, converting them to a Point , running the reduction algorithm, then converting the reduced points back into a list of Location objects. The problem is here: float[][] simplified = simplify.simplify(points2D, 10000.0f, true); It always comes out with a size of 2.

Douglas-Peucker - Shortest arc from a point to a circle, on the surface of a sphere

China☆狼群 提交于 2020-01-06 02:22:06
问题 I have seen many examples in various programming languages that are using the Douglas-Peucker polyline simplification algorithm to produce a GPolyline to be used on Google Maps. The algorithm, when expressed for polylines on a plan, involves the calculation of the distance between a point and a line (passing through two other points). Now all the examples I have seen so far are applying the algorithm in a very naïve way, simply by replace x and y by the latitude and longitude. This may