[OSM-dev] Proposal: Database accelerator and dirty tile marker based on simple algorithm.

Nick Hill nick at nickhill.co.uk
Sat Sep 16 22:48:06 BST 2006


Lars Aronsson wrote:

> The way we currently render roads, by drawing every line segment 
> that fits in a tile, makes it extremely time-consuming to draw 
> tiles in smaller scales (zoom=10 thru 0).  The way out of this 
> must be to invent a smarter algorithm to decide what to draw at 
> each zoom level.  Instead of millions of individual simple line 
> segments, they could be grouped as higher level objects, each 
> having a bounding box.  All the minor streets in Oxford could be 
> grouped as a local street mesh, rendered as an area in grey on the 
> tile that shows England in the map of Europe (zoom=3).  But this 
> grouping has to be done long before it is time to render that 
> tile.  It will always be too slow to do a "select line_segments 
> from ..." that returns many thousand database records.

My suggestion is that different classes of objects have a different zoom 
level associated or specifically set for them. If we select the whole of 
Britain but only those objects with zoom >=x, ie nodes and segments 
which constitute motorways, national rail and large lakes, it would be 
practical to perform such a select and to render the result.




More information about the dev mailing list