[Talk-us] a more compressed OSM?

Samat K Jain lists at samat.org
Fri Sep 17 21:51:41 BST 2010


On Tuesday, September 14, 2010 09:24:12 am jeremy jozwik wrote:
> hello fellow mappers! for years i have been using my openmoko for my
> gps tracking mapping general screwing around.
> recently the device has lost its ability to read from the SD card so i
> have been viciously limited in the storage i have available for cached
> map tiles. right now i am limited to maybe 150mb, which is tiny for a
> big city like los angeles.
> 
> anyhow im wondering if there is a more compressed version of OSM tiles
> out there already?
> i have a local cache on my debian machine that i am attempting to
> batch compress, not really working so far.
> so i am wondering if there is already a url of these types of map tiles.

If you're working with pre-rendered tiles, one major waste of space is the 
mismatch between tile file sizes and cluster sizes.

A lot of people ignore low-level details like this, but it's an important 
issue for storage and caching, especially on devices with small amounts of 
storage.

Most phones' cache is stored on FAT32 (I am not sure about OpenMoko; this is 
true of Android, at least): FAT32 has a cluster size of 4 KiB. That is, even 
if your file is 100 bytes, it will take 4 KiB to store. If your file is 4.1 
KiB, it will take 8 KiB to store.

With this in mind, you can imagine that a *significant* amount of disk space 
is simply *wasted* when storing tiles which are never 4 KiB exactly (in my 
experience most are < 4 KiB).

For example, if you're dedicating 150 MiB to cache storage, this is only about 
38400 tiles. How big an area this is depends on the zoom level used, but it's 
a 195x195 tile area.

This problem exists on many Linux filesystems too, though for many modern 
filesystems (i.e. ext4) there are a few tricks to mitigate this problem (i.e. 
small files can be stored along with metadata).

I'm unsure of any particularly good ways around this problem (binary 
database?)… but in the short term: are you using a modern filesystem like ext4 
for storing cache files?

-- 
Samat K Jain <http://samat.org/> | GPG: 0x4A456FBA

I prefer the "u" in honour as it seems to be missing these days.
-- None (663)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openstreetmap.org/pipermail/talk-us/attachments/20100917/fe65a58b/attachment.pgp>


More information about the Talk-us mailing list