[OSM-dev] Hierachical search of sea tiles (was:disk usage...)
streetmap at blibbleblobble.co.uk
Wed May 2 18:54:05 BST 2007
On Wednesday 02 May 2007 16:34, Martijn van Oosterhout wrote:
> You're surely not proposing that the DB check
> level-17, then 16, then 15 all the way to level 12 until it gets a
I would like to propose this, if it hasn't been already. If a tile is marked
"all-sea", then that information applies to all subtiles, and the handler
does a search 'upwards' through the zoom levels.
It's a form of compression - one z-7 tile could cover most of an ocean (saving
tens of thousands of files|rows), and as you get closer to the coastline the
sea tiles get smaller and smaller to fill the gaps until they hit coastline.
The worst-case is about 10 [database] lookups, and that's if you're browsing
at z-17 in the centre of an ocean. The closer you are to a coast (i.e.
somewhere worth browsing), the fewer lookups it will need.
Compared to a fixed-format binary file, it has the advantage of being sparse
(no need to store _every_ z-17 sea tile, only the ones where they're needed
to fill a curvy coastline)
More information about the dev