Check out
http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithmfor
details of the algorithm.

It links to some Python code at
http://ryba4.com/python/ramer-douglas-peucker

Good luck,
Steve

On 1 June 2010 06:26, Anthony <[email protected]> wrote:

> Look into the encoding algorithms for polylines. Depending on how you
> want to do it, you could probably adjust them to fit a fix (or
> approximate) number of points, or maybe the regular algorithms will
> work just fine for your purposes.
>
> On May 31, 11:25 am, Nicolas J <[email protected]> wrote:
> > Hello
> > I'm wondering if it's possible to reduce the number of points in a
> > polyline but to chosse the exact or an approximate number of points I
> > want to.
> >
> > Example:
> > reducePolyline(existingPolylineWith1000Points, 500)
> >
> > This function return me a new polyline with only 500 points of the
> > original.
> >
> > Of course, it's easy to remove points of an existing polyline, but
> > some points are less important that other, so of course, it's better
> > to remove the less important point first.
> >
> > Thank you!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to