Outils pour utilisateurs

Outils du site


hackfest2009:hackfest2009

Ceci est une ancienne révision du document !


Hackfest 2009

Installation et configuration de PostgreSQL/PostGIS

  • Paquet installé pour PostGIS : postgresql-8.3-postgis. Cela installe le serveur et le client PostgreSQL, ainsi que l'extension Postgis. À noter que le paquet postgis installe seulement quelques outils liés à PostGIS, pas PostGIS lui-même.
  • Paquet installé pour une interface graphique d'administration de PostgreSQL: pgadmin3
  • Configuration du mot de passe de l'utilisateur postgres du serveur de base de données (pas l'utilisateur Unix !), voir https://help.ubuntu.com/community/PostgreSQL#Basic%20Server%20Setup
  • Chargement de france.osm dans le pgsql de Thomas avec osm2pgsql (svn rel 17214) : osm2pgsql -c -d testdb -m -U test -H surf.local Desktop/france.osm.bz2

Ressources

OpenStreetMap

Installation Ubuntu par PXE

Installation mapnik

  • compilation
$ cd mapnik-0.6.1/
$ python scons/scons.py configure INPUT_PLUGINS=all \
  OPTIMIZATION=3 PREFIX=/usr/local/stow/mapnik-0.6.1 \
  PYTHON_PREFIX=/usr/local/stow/mapnik-0.6.1/ \
  SYSTEM_FONTS=/usr/share/fonts/truetype/ttf-dejavu/
$ python scons/scons.py
$ export PYTHONPATH="/home/thomas/sys/lib/python2.6/site-packages"
$ export PYTHONPATH="/home/thomas/sys/lib/python2.6/site-packages"
$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mapnik
>>> 
$ svn checkout http://svn.openstreetmap.org/applications/rendering/mapnik mapnik-osm
$ cd mapnik-osm/
$ diff -u ./set-mapnik-env.orig  ./set-mapnik-env
--- ./set-mapnik-env.orig	2009-08-23 18:39:24.000000000 +0200
+++ ./set-mapnik-env	2009-08-23 18:43:28.000000000 +0200
@@ -30,26 +30,26 @@
 
 # This is the name of the *local* version of the Mapnik map file after it has
 # been run through the cutomize-mapnik-map script.
-export MAPNIK_MAP_FILE=~/mapnik/osm.xml
+export MAPNIK_MAP_FILE=~/osm/mapnik-osm/osm.xml
 
 # This is the directory where the icons and symbols for Mapnik are. If
 # you have checked out the OSM subversion directory into a directory
 # called ~/svn.openstreetmap.org, the symbols will be in
 # ~/svn.openstreetmap.org/applications/rendering/mapnik/symbols
-export MAPNIK_SYMBOLS_DIR=~/mapnik/symbols
+export MAPNIK_SYMBOLS_DIR=~/osm/mapnik-osm/symbols
 
 # This is the directory where you upacked the world_boundaries.tar.bz2
 # file you got from
 # http://artem.dev.openstreetmap.org/files/world_boundaries.tar.bz2
-export MAPNIK_WORLD_BOUNDARIES_DIR=~/mapnik/world_boundaries
+export MAPNIK_WORLD_BOUNDARIES_DIR=~/osm/mapnik-osm/world_boundaries
 
 # Directory where the created map tiles should be stored. Must end with
 # a slash (/)
-export MAPNIK_TILE_DIR=~/mapnik/tiles/
+export MAPNIK_TILE_DIR=~/osm/mapnik-osm/tiles/
 
 # This is the name of the server running the PostgreSQL database. Leave
 # this empty if your database is on the local machine.
-export MAPNIK_DBHOST=""
+export MAPNIK_DBHOST="localhost"
 
 # This is the TCP port where the PostgreSQL server is listening. The
 # default port for PostgreSQL is 5432. Leave this empty if your database
@@ -57,13 +57,13 @@
 export MAPNIK_DBPORT=""
 
 # This is the name of the database where the OSM data is stored.
-export MAPNIK_DBNAME='osm'
+export MAPNIK_DBNAME='testdb'
 
 # This is the username we should use to log into the PostgreSQL database.
-export MAPNIK_DBUSER=`whoami`
+export MAPNIK_DBUSER="test"
 
 # This is the password we should use to log into the PostgreSQL database.
-export MAPNIK_DBPASS=""
+export MAPNIK_DBPASS="test"
 
 # This is the prefix used in the table names. Matches the -p option in osm2pgsql
 # Unspecified defaults to "planet_osm"
$ . ./set-mapnik-env
$ ./customize-mapnik-map >$MAPNIK_MAP_FILE
hackfest2009/hackfest2009.1251046075.txt.gz · Dernière modification: 2009/08/23 18:47 par 82.247.183.72