[OSM-dev] tiles at home disk usage

Martijn van Oosterhout kleptog at gmail.com
Wed May 2 17:38:05 BST 2007


On 5/2/07, Robert Hart <bathterror at gmail.com> wrote:
> > The existing info for coasttile data extended to level-17 is about as
> > optimal as you can get: 2 bits per tile requiring only 4GB for all of
> > level-17.
>
> erm. so the 2 bits per tile at level-12 file, "oceantiles_12.dat" that
> takes 4,194,304 bytes is more optimal than the 159,179 byte
> "oceantiles_12.png" file that contains the same information?
>
> Surely we could at very least run-length encode the data?

The problem is: to get a pixel out of the PNG you have to unpack the
image, then check the pixel. To get the data out of the dat file, you
simply seek to the right point and read.

So yes, you could use the image, except now every lookup has to unpack
and load the entire image into memory. We're trading disk space for
speed here.

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/




More information about the dev mailing list