Tiles@home for CommonMap

From CommonMap

Jump to: navigation, search

tiles@home is developed in OpenStreetMap project. CommonMap use the same data format for map data. Of course, we can use tiles@home, too.

Contents

Install

Install OpenStreetMap version first!

tiles@home is developed in OpenStreetMap, so at the first, install the OpenStreetMap version. See their install guide.

Roughly do

  1. install perl, some perl modules, Java JRE and rastalizer (inkscape or batik).
  2. Install tiles@home and osmarender by svn.
    svn co http://svn.openstreetmap.org/applications/rendering/tilesAtHome-dev/tags/Ulm tilesAtHome
  3. Configuration. Edit tilesAtHome.conf by following the instruction. You don't need to edit authentication.conf yet.

Add CommonMap's setting

Revise ./general.conf as the following:

--- ../../OSM/tilesAtHome/general.conf  2009-08-13 23:43:26.164755612 -0700
+++ general.conf        2010-01-11 02:22:55.786505693 -0800
@@ -1,5 +1,5 @@
 #
-# Config file for TilesAtHome
+# Config file for TilesAtHome (CommonMap version)
 #
 # General configuration options updated from svn
 #
@@ -16,26 +16,26 @@
 # %b - bounding box
 # %p - predicate
 # %v - API version
-API_API = http://www.openstreetmap.org/api/%v/map?bbox=%b
+API_API = http://demo.commonmap.org/api/%v/map?bbox=%b
-API_TRAPI = http://api1.osm.absolight.net/api/%v/map?bbox=%b
+#API_TRAPI = http://api1.osm.absolight.net/api/%v/map?bbox=%b
-API_ROMA = http://api1.osm.absolight.net:8080/api/%v/map?bbox=%b
+#API_ROMA = http://api1.osm.absolight.net:8080/api/%v/map?bbox=%b
-API_XAPI = http://www.informationfreeway.org/api/%v/*[bbox=%b]
+#API_XAPI = http://www.informationfreeway.org/api/%v/*[bbox=%b]
 
-XAPI_XAPI = http://www.informationfreeway.org/api/%v/%p[bbox=%b]
+#XAPI_XAPI = http://www.informationfreeway.org/api/%v/%p[bbox=%b]
 
 ## Rendering
 BorderNS=0.17
 BorderWE=0.5
 
-GoNogoURL=http://server.tah.openstreetmap.org/Request/upload/go_nogo/
-UploadURL=http://server.tah.openstreetmap.org/Request/upload/
+GoNogoURL=http://localhost/tah/Request/upload/go_nogo.php
+UploadURL=http://localhost/tah/Request/upload.php
 UploadToDirectoryMaxQueueLimit = 50
 
-RequestURL=http://server.tah.openstreetmap.org/Request/take/
+RequestURL=http://localhost/tah/Request/take.php

-ReRequestURL=http://server.tah.openstreetmap.org/Request/feedback/
+ReRequestURL=http://localhost/tah/Request/feedback/ #not ready
 
-VersionCheckURL=http://server.tah.openstreetmap.org/Request/latestClient/
+VersionCheckURL=http://localhost/tah/Request/latestClient/ #not ready
 
 ClientVersion=Ulm

(Note: this configuration is for demonstration.)

Add CommonMap-rules to osmarender. get the rule set form subversion repository. Put them including patterns and sysbols directories into ./osmarender/stylesheets/ .

revise ./layers.conf as the following:

--- ../../OSM/tilesAtHome/layers.conf   2009-03-10 20:44:46.562815583 -0700
+++ layers.conf 2010-01-11 13:31:29.143602618 -0800
@@ -16,26 +16,24 @@
 # Either run default (highzoom) or lowzoom, not both at the same time
 # Lowzoom (<z12) works in xy mode, but not yet in loop mode!
 # could be overridden on command line as "--Layers=caption" for example
-Layers = captionless,tile,maplint
+Layers = tile
 
 # LowzoomLayers defines a list of layers to be rendered in XY mode 
 # for zoom levels <12 and >= 6 if not specified on the command line.
-LowzoomLayers = caption,captionless,tile
+LowzoomLayers = tile
 
 # WorldLayers defines a list of layers to be rendered in XY mode 
 # for zoom levels <6 if not specified on the command line.
-WorldLayers = captionless,tile
+WorldLayers = tile
 
 # LayersCapability will enable the client to switch automatically between 
 # lowzoom and default/maplint Layers depending on job from t@h server
-LayersCapability = captionless,tile,maplint,caption
-
-
+LayersCapability = tile
 
 # Details for "default" layer
 # ---------------------------
 
-[tile]
+[osm]
 
 MinZoom = 12
 MaxZoom = 17
@@ -51,7 +49,7 @@
 # prefix for tiles from this layer. this is what the server will see,
 # and has to match what the server expects. I.e. you can rename your
 # layer "gobblebobble" but don't change the prefix.
-Prefix = tile
+Prefix = osm
 
 # preprocessor is a comma-separated list of any (or none) of the following:
 # maplint, close-areas
@@ -69,6 +67,25 @@
 # lowzoom stiching layers
 LowZoom = captionless,caption
 
+[tile]
+
+MinZoom = 12
+MaxZoom = 12
+
+# osmarender rule files to be used, one for each level
+Rules.12 = osmarender/stylesheets/CommonMap-z12.xml
+Rules.13 = osmarender/stylesheets/CommonMap-z13.xml
+Rules.14 = osmarender/stylesheets/CommonMap-z14.xml
+Rules.15 = osmarender/stylesheets/CommonMap-z15.xml
+Rules.16 = osmarender/stylesheets/CommonMap-z16.xml
+Rules.17 = osmarender/stylesheets/CommonMap-z17.xml
+
+Prefix = tile
+Preprocessor = close-areas,area-center
+Transparent = 0
+RequiredFiles = tilesGen.pl
+RenderFullTileset = 0
+LowZoom = captionless,caption
 
 # Details for "POI" layer (currently not used)
 # ---------------------------

Run it

Take the tile number by some way, then input the following on the command line when the current directory is tilesAtHome.

usage)

$ perl tilesGen.pl xy (x) (y) (zoom level) (tile set name)

example)

$ perl tilesGen.pl xy 1234 5678 12 tile

If you set in ./tilesAtHome.conf as

WorkingDirectory=/somewhere/fast/stages/tmp/

you will find the rendered images in the directory or zip files gathering them in the subdirectory "uploaderble".

To running in stand alone, by setting ./tilesAtHome.conf as

UploadToDirectory=1
UploadTargetDirectory=/somewhere/big/stage/upload

the uploaderble zips moved into the UploadTargetDirectory by the command.

$ perl tilesGen.pl upload

How to join distributing rendering of CommonMap's main tile set

get account from tile server

See CommonMap tile server for detail.

setting authentication.conf

Edit authentication.conf as the following:

UploadUsername=your_user_name_you_have_set_to_the_tile_server
UploadPassword=the_password_you_have_set_to_the_tile_server
.

Please make sure to set ./tilesAtHome.conf

UploadToDirectory=0

running

$ perl tilesGen.pl loop

It runs in loop. Although You can stop any timing, it is good to check your locking task at the management web page.

Personal tools