[OpenLayers-Users] Large geodesic errors over long distances

Andreas Hocevar ahocevar at opengeo.org
Fri Mar 26 09:25:01 EDT 2010


On 2010-03-26 08:46 , realjax wrote:
> When I try using the measure tool on my map (google projection) I get *huge*
> distance differences when I test it over long distances (draw a line from
> Japan to US crossing Africa for instance). With geodesic turned on it says
> this is a couple of thousand kilometers, with geodesic turned off it gives
> me a more accurate ( 70.000 kilometers).
>    

If you don't have any points in between, geodesic measuring will give 
you the shortest distance on the sphere. Which, in the case of Japan - 
US is not crossing Africa, but going directly across the Pacific Ocean. 
The fix would be to add points in between (e.g. one over Africa).

Regards,
Andreas.

> You can see for yourself in the  measure example @
> http://openlayers.org/dev/examples/
>
> Any idea what's causing this? Is there a fix?
>
> Thanks&  regards
>    


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list