People who like quiz like
Cescozen
Cescozen is a game invented by Cesco. If you point your browser to the initial page of the game, you'll encounter very difficult enigmas that wait for a solution (note: the game is in Italian). To answer each quiz, you put the solution on the URL, so that you move one directory down the tree. To me and Virgi, it took about a week investing 2-3 hours each day to get through all levels. Sometimes, the quiz requires that you search something in Google, or you have a satellite image and you need to figure out where it is. Very impressive, amazing game!
People who like quiz like also to follow howto instructions to get
The full Map Stack up and running
I am fascinated by the Open Source technology behind OpenStreetMap, which I believe will soon be succesful as Wikipedia is.
After importing the dump of Switzerland in the old Gentoo server, I showed the result to my father and he gave me another piece of iron to reach the next level of this particular game: it is an IBM with 3.2 GHZ and 1 GB of RAM. I installed Ubuntu Jaunty (9.04) on the server and repeated the PostgreSQL and mapnik install following these howto instructions made by Johnny Dobbins. This tutorial additionally explains how to install the WMS server called ogcserver and how to put a cache in front of it, so that already computed tiles do not need to be recomputed but can just be served directly from disk (or from memcache or even from Amazon S3).
Just some remarks on how the job was done:
Choosing a bounding box
the server has 74 GB of disk, so based on this specs I decided to import Europe and part of Asia till longitude of Moskau and not the whole planet. For the whole planet you probably need at least 200 GB of disk.
To be precise I chose this rectangle with coordinates taken from an old fashioned Atlas: Top left corner: 75 N, 35 W Bottom right corner: 20N 60 E
This command extracted from the whole planet file the bounding box and created a new dump called eurasia.osm.bz2. The decompression and compression is done with bzcat and bzip2 piped together.
bzcat ../../planet-latest.osm.bz2 | ./bin/osmosis --read-xml enableDateParsing=no file=/dev/stdin --bounding-box left=-35 bottom=20 right=60 top=75 --write-xml file=- | bzip2 > ../../eurasia.osm.bz2
The execution lasted for about 14 hours. Out of the 7.4 GB
of planet-latest.osm.bz2, about 2.2 GB of data where
extracted for eurasia.osm.bz2. After the import with
osm2pgsql
in Postgres database, the bounding
box takes about 40 GB of disk space.
Minor remarks on the howto of Johnny
I did not find the lines in cgiserver.py
, so I
left this step out.
For the file wms.py
: you need to completely
replace the existing file with the lines shown in the howto.
Setup of ogcserver
When browsing to http://localhost:8080, I got an error.
Looking at /var/log/apache2/error.log
,
I noticed this error:
IOError: sys.stdin access restricted by mod_wsgi
I then added at the bottom of
/etc/apache2/sites-available/default
outside
the VirtualHost
section the following two lines:
WSGIRestrictStdout Off WSGIRestrictStdin Off
Tilecache: Seeding the cache
After setting everything up, pieces of the map started appearing. However, often the server got overloaded, if it had to compute tiles which where full of features (streets and rivers). Especially the tile with Germany never appeared as it was too feature rich. Eventually, the server hang up when even the swap cache got full.
The solution to this performance problem was to seed the cache. I chose a point in the center of Europe (46 N, 10 E) and a radius of 30 degrees.
I then issued in the directory
ogcserver/tilecache-2.10/
the following command:
./tilecache_seed.py basic 46,10,30 [press Control D on the keyboard]
and I let compute map tiles for about 48 hours.
The result
Here it is :-). Happy browsing, press twice the plus button first, to reach the correct zoom level. The speed in serving tiles might vary, as I have an ADSL and use dynamic DNS...