[OSM-dev] Slippy Map, automatic Tile Rendering
hakan at gurkensalat.com
Thu Jan 18 17:31:51 GMT 2007
Robert (Jamie) Munro wrote:
> This sounds like a bad idea because you would have to perform a huge
> number of queries, one for each tile (is tile[n].current version >
> tile[n].last version). Why not just use last update timestamp or a
> globally incrementing counter, then you need only ask "Send me all tiles
> with timestamp > [last time I checked]" which is really simple for the
> DB to answer (as long as you index the field).
> [ ... ]
> Only if the different renderers always use the same tiles. Currently,
> they don't - e.g. there are renderers that use a mercator projection,
> and others that use a simple rectangular latitude and longitude for use
> in products like Google Earth or WorldWind.
Another idea: build a trigger that computes the tile number (for each
different renderer, if multiple projections are used) and sets a flag
for that tile on each insert/update/delete for a certain point / way /
That way (using database triggers), the applications that modify data
would not need to know which tiles are to be invalidated, all necessary
knowledge is in the trigger (which can be written quite efficiently). We
use this strategy in a few commercial projects which handle hundreds of
thousands changes daily.
The Key To Immortality Is First Living A Life Worth Remembering.
More information about the dev