[OSM-dev] Hierachical search of sea tiles (was:disk usage...)

Stefan de Konink skinkie at xs4all.nl
Wed May 2 19:03:12 BST 2007


On Wed, 2 May 2007, OJW wrote:

> 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
> > hit?
>
> 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)

Is this technique also applyed to the rendering part of the sea?


Stefan





More information about the dev mailing list