On Dec 14, 8:32 pm, "Neil.Young" <[email protected]> wrote:
> > What I have done is very simple. I have converted every vertex from
> > Lat/Lon coordinates to pixel coordinates at zoom level 17. Point
> > reduction is based on three consecutive vertices which always form a
> > triangle. I compare the distances AB+BC with AC. If (AB+BC-AC) is
> > less than the tolerance, B is flagged to be discarded. B cannot be
>
> The "tolerance" - is it a relative or absolute value?
I have tried both. The results are not significantly different:
var AB = Math.sqtr((x[i-i]-x[i])*(x[i-i]-x[i])+(y[i-i]-y[i])*(y[i-i]-y
[i]))
var AC = Math.sqtr((x[i-i]-x[i+1])*(x[i-i]-x[i+1])+(y[i-i]-y[i+1])*(y
[i-i]-y[i+1]))
var BC = Math.sqtr((x[i]-x[i+1])*(x[i]-x[i+1])+(y[i]-y[i+1])*(y[i]-y[i
+1]))
Relative:
(AB+BC) / AC < whatever
Absolute:
(AB+BC) - AC < whatever
I left out a key first step. Identical or almost identical points are
eliminated first. The average of the cluster replaces the points in
the cluster. Everything is done in pixels at zoom level 17.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---