[OSM-dev] Proposal: Database accelerator and dirty tile marker based on simple algorithm.
Lars Aronsson
lars at aronsson.se
Sat Sep 16 22:36:57 BST 2006
Nick Hill wrote:
> There is a problem where large scale views of an area will
> constantly be invalidated by small changes in the area, despite
> those changes not affecting objects visible at the current zoom
> level.
I'm not sure if you and I mean the same thing with "large scale".
A world map (zoom=0) has a very small scale, and as you zoom in
the scale increases, because 1:50,000 is larger than 1:500,000.
The largest scale (1:1) is reality itself.
Anyway, I think the problem you try to describe is that tiles in
the world map would constantly be invalidated by any changes in
local details. In today's slippy map, this would not be a problem,
since we only render roads at zoom=11 and deeper. There is never
any need to invalidate the tiles at higher zoom levels (1 thru
10).
However, in the future we must hope that we can render roads even
at the smaller scales (zoom=0 thru 10). But I think it is fair to
allow a lag in their update. Say for example that the world map
(zoom=0) is only updated once an hour. I'm not suggesting that it
should take an hour to render these tiles, only that users would
be able to accept such a lag.
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.
--
Lars Aronsson (lars at aronsson.se)
Aronsson Datateknik - http://aronsson.se
More information about the dev
mailing list