location and naming
Background maps are stored in png format in different zoom levels in ./seiscomp3/trunk/share/maps .
The naming scheme is as follows:
world.map covers the whole world (180°W to 180°E and 90°S to 90°N).
The next zoom level is given by world0.png, world1.png, world2.png, world3.png, separating the upper-level area into four quadrants and starting with the upper right corner, counter-clock-wise:
- world0.png covers 0°E to 180°E and 0°N to 90°N
- world1.png covers 180°W to 0°E and 0°N to 90°N
- world2.png covers 180°W to 0°E and 90°S to 0°N
- world2.png covers 0°E to 180°E and 90°S to 0°N
Each of these tiles can be further subdivided, e.g. the area of world0.png into a world00.png, world01.png, world02.png and world03.png, where wold03.png covers the area 90°E to 180°E and 0°N to 45°N, and so on.
The requirements for own files are as following:
- Format .png
- Tiling as described above, exactly matching the nth-level quadrants of a world map (180°W to 180°E and 90°S to 90°N)
- Pixel dimensions need to be x:y = 2:1 (however, the relolution may be any, and may differ between different zoom levels as well as between the files of the same zoom level. Just be aware that files with sizes of many MB will be slow in loading to e.g. scolv)
- Projection needs to be standard cylindrical (using latitude and longitude as Cartesian coordinates)
- The number of zoom levels may be any, however, zoom levels need to be vertically complete (e.g. the file world032.png, covering 90°E to 135°E and 0°N to 22.5°N, is only used if also a file world 03.png is available.
- Laterally, the number of zoom levels may be heterogeneous. E.g., Swiss seismological service may care to have zoom levels down to the files world0122230, map, world0122231.map, world0122232.map and world0122233.map to cover its network area at 25m resolution and reasonable file sizes, while the largest resolution available in Australia is world3.map.
Download Maps From Public Map Servers
In Seiscomp3 you can also use maps downloaded from public map servers such as Openstreetmap or Opencyclemap. Here are the instrutions on how to download the tiles and how to configure Seiscomp3 to use them.
First install the program downloadosmtiles.pl from http://search.cpan.org/~rotkraut/Geo-OSM-Tiles-0.02/downloadosmtiles.pl
- Click on the Download link on the right hand side.
- Unpack the tar file.
- Install it as described in the README contained in the tar file.
Next create tiles for the whole world at a moderate resolution. The -zoom option tells how detailed the tiles should be. Be aware that higher zoom levels will download an enormous amount of files.
Create a directory to store the maps..
mkdir /usr/local/share/osmap
cd /usr/local/share/osmap
Download low resolution map tiles for the whole world
downloadosmtiles.pl --lat=-90:90 --lon=-180:180 --zoom=0:6
Next you can download tiles for your region of interest in a considerable higher resolution. In our example this is Switzerland. You don't need zoom levels 0:6, they have already been downloaded for the worldwide example above.
downloadosmtiles.pl --lat=45:49 --lon=6:13 --zoom=7:13
To use these maps put the following lines in global.cfg or scolv.cfg:
# /usr/local/etc/global.cfg
map.location = /usr/local/share/osmap/%l/%c/%r.png
# Projection of the map tiles. Supported formats are: rectangular and mercator.
# Use mercator for Openstreetmap and Opencyclemap. Use rectangular for the maps you
# downloaded from Gempa at http://www.seiscomp3.org/downloader/download/category/5
map.format = mercator
If you don't like the look of the map you can try a different map server, eg. opencyclemap.org
downloadosmtiles.pl --lat=-90:90 --lon=-180:180 --zoom=0:6 --baseurl='http://tile.opencyclemap.org/cycle'
downloadosmtiles.pl --lat=45:49 --lon=6:13 --zoom=7:13 --baseurl='http://tile.opencyclemap.org/cycle'
Be aware that some map servers don't like if you download large numbers of tiles with a script. If your downloads stop with an error message like "no route to host..." you may have been kicked out by an abuse detection. In this case reduce the zoom level or the geographical aeria and try again from an other computer or use a proxy server.
eg.
export http_proxy=http://proxy.ethz.ch:3128 # replace this with the proxy of your institute or internet provider
downloadosmtiles.pl --lat=45:49 --lon=6:13 --zoom=13:13 --baseurl='http://tile.opencyclemap.org/cycle'
Using the proxy server is highly recommended in case you do this in a group at a workshop or a class of students.