[Routing] handle zooming far out
marcus.wolschon at googlemail.com
marcus.wolschon at googlemail.com
Wed Mar 18 11:00:53 GMT 2009
On Wed, 18 Mar 2009 12:51:15 +0200, Nic Roets <nroets at gmail.com> wrote:
> Gosmore generates a separate low zoom vector map that only contains
> motorway
> and coastlines (objects with a large scalemax parameter). One of the
> problems I still have this approach is simplifying objects so that you
> don't
> have to draw thousands of segments without leaving out long segments. I
> also
> want to increase the number of zoom maps to more than 2 (lowzoom and
> normal).
You may look at
http://travelingsales.svn.sourceforge.net/viewvc/travelingsales/libosm/src/org/openstreetmap/osm/data/WayHelper.java?view=markup
public List<WayNode> simplifyWay(final Way w);
does a pretty good job at coastlines.
As long as you don't have nodes of order > 2 combining ways before
simplification gives even better results.
It just gets hairy when you get nodes of order > 2 as with combining
both lanes of a motorway.
> One of the interesting things I considered, but did not implement was to
> store the simiplified map inside an empty part the main map, e.g.
somewhere
> in the Pacific ocean.
I'm storing them in a separate map but another alternative may be to store
it in the area >180° .
Marcus
More information about the Routing
mailing list