On May 2, 6:27 am, René <[email protected]> wrote:
>
> The resulting circle would contain a 25% of the original waypoints.
> Now I realize in this example it would be trivial simple to discard
> every second, third and fourth waypoint. But in other cases, the
> frequency of waypoints may change. The idea being, I want to preserve
> the integrity of the polyline as much as possible, while telling the
> algorithm to discard 75% of the waypoints. Or something like that.

Douglas-Peucker reduces a line while maintaining its integrity. The
polyline encoder uses it, but it can be tweaked if you have your own
encoder. Try Mark McClure's at 
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/
for starters. What you don't want to do is simply discard points based
on a ratio, though: DP makes some attempt to keep sharp corners as
sharp corners rather than smoothing them off.
http://www.google.co.uk/search?q=douglas+peucker+algorithm

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to