[Tilesathome] t at h client tilesetfile creation
Matthias Julius
lists at julius-net.net
Tue Oct 14 18:05:05 BST 2008
spaetz <osm at sspaeth.de> writes:
> Hi Matthias (and others).
>
> I tested the creation of tilesetfiles by the client. They look good. I
> have implemented tileset file handling now.
>
> the upload happens with layer,z,x,y POST variables that are used to
> determine where to save the file.
>
> So far so good. One problem is that this will again save "empty"
> tileset files. This needs solving before we can use that one a large
> scale.
>
> And we can't (or want) afford the storage space for 16 million
> tileset files * 4 layers if they just contain land/sea. What strategy
> should we use?
>
> Any of the following is possible, we just need to decide which one is
> best:
>
> 1) The server needs to do a content analyis of the tileset file
> in question and discards it if it's empty. I would like to avoid that
> if possible as it would require examining all of the uploaded tileset
> by the server as part of the upload process.
>
> 2) We implement a HTTP API call that let's clients notify the server
> that a tileset is indeed empty and that the server should delete a
> file if it's there. Easiest for the server, no idea how difficult on
> the client side.
>
> 3) we save the tilesets and have a cron job that examines all existing
> tileset files and deletes empty ones regularly. Not that difficult but
> probably wasteful?
3a) only check tileset files that have been uploaded since the last
check.
4) the client can upload a special "empty" file.
4a) this file only contains 1 byte (1=sea, 2=land, 3=transparent)
4b) this file is a special tileset file that instead of containing 4
bytes for each empty tile only contains the information that all tiles
are empty and whether it is land, sea or transparent.
Do we want to keep meta data for empty tilesets?
Having a special "empty" file could eliminate the need for database
lookups while tile serving alltogether. The drawback of this is that
it will be a lot of inodes. Don't know if that is a problem.
What filesystem does the server use for the tile store? Does it store
small files directly in the inode instead of wasting a whole block for
a 1 byte file?
Matthias
More information about the Tilesathome
mailing list