Talk:Tiles@home/Layers

From OpenStreetMap Wiki
Jump to navigation Jump to search

Architecture options

Actually it would be great if the server handing out rendering requests would also instruct the client where to send the results for each layer, and possibly in what format - so if it is later decided to move a layer somewhere else, this can be simply achieved by changing the server config. --Frederik Ramm 22:44, 20 March 2007 (UTC)

Identifying layer on upload

If the upload for each layer would work separately (see Architecture Options above), then the zip file (or other "batch") could include information about which layer the tiles are intended for. --Frederik Ramm 22:44, 20 March 2007 (UTC)

Adding layer to filename is probably the easiest part of this changeover, since x,y,z fields are already taken from filenames. Ojw 22:52, 20 March 2007 (UTC)

URLs

I believe it should be possible to create mod_rewrite rules that will branch off URLs with the layer specified to another directory. It's just a matter of counting slashes, isn't it? --Frederik Ramm 22:44, 20 March 2007 (UTC)

Zoom Levels

It may be worthwile to think about what happens if certain layers are not available in all zoom levels. A maplint layer, for example, would probably be sufficient to have for zoom level 12 (to get an overview of where something is wrong) and zoom level 14 or 15 (to spot the exact position of a problem). If such a decision is made for a layer, then all requests to non-existing layers should be answered by a fixed image bearing the message "you are trying to view zoom level X for layer Y but only A,B,C are available". --Frederik Ramm 22:53, 20 March 2007 (UTC)


Identifying layer on upload

you could also give the layers names so the default layer becomes "tiles" and another maybe "maplint" making the tile-filenames maplint_z_x_y.png --Deelkar (talk) 01:19, 21 March 2007 (UTC)

Storage

Analogous to the tilenames you could use the layer name as identifier, minimizing the need for changes in code. Maybe rename the default layer to osmarender in the process? Secondly the mod_rewrite rule needs to adapt for that too, along the lines of my other proposals the part "tile.php" would serve as an identifier for the layer and, to keep with the maplint example be renamed maplint.php, for instance, or if that should be undesireable be changed into something else to make the mod_rewrite rule easier to distinguish between single-layer and multilayer-capability. --Deelkar (talk) 01:24, 21 March 2007 (UTC)

Browsing tiles, URLs

this:
RewriteRule ^tile.php/([0-9]+)/([0-9]+)/([0-9]+).png$ 00$1/00000$2/00000$3.png
RewriteRule ^0*([0-9]{2})/0*([0-9]{3})([0-9]{3})/0*([0-9]{3})([0-9]{3}).png data/Tiles/$1/$2/$3/$4/$5.png

can be changed into

RewriteRule ^tile.php/([0-9]+)/([0-9]+)/([0-9]+).png$ 00$1/00000$2/00000$3.png
RewriteRule ^0*([0-9]{2})/0*([0-9]{3})([0-9]{3})/0*([0-9]{3})([0-9]{3}).png data/Tiles/$1/$2/$3/$4/$5.png
RewriteRule ^tile_layers.php/(SOME_REGEX)/([0-9]+)/([0-9]+)/([0-9]+).png$ $1/00$2/00000$3/00000$4.png
RewriteRule ^(LAYER_ID)/0*([0-9]{2})/0*([0-9]{3})([0-9]{3})/0*([0-9]{3})([0-9]{3}).png data/Tiles/$1/$2/$3/$4/$5/$6.png

where $1 becomes the layer information, and still be backwards compatible. --Deelkar (talk) 01:32, 21 March 2007 (UTC)

Relief layer

doesn't actually exist yet does it? so a bit misleading publishing an API for it here? Ojw 18:54, 24 September 2007 (BST)