OSM on Swissgrid

De Stéphane Brunner.

bzcat europe.osm.bz2|~/bin/osmosis-0.31/bin/osmosis --read-xml enableDateParsing=no file=-\ /dev/stdin --bounding-box top=48.24 left=5.13 bottom=45.40 right=11.46 --write-xml file=-\ | sed '1d' > swiss.osm
sudo -u postgres osm2pgsql --slim --create --database osmch --proj 21781 swiss.osm

head in osm.xml (mapnik style):

<Map bgcolor="#F1EEE8" minimum_version="0.7.1" srs="+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs ">

on inc/settings.xml.inc change osm2pgsql_projection to

<!ENTITY osm2pgsql_projection "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs">

fill tilecache/tilecache.cfg with:

[cache]
type = Disk
base = /home/tiles

[DEFAULT]       
bbox = 420000, 30000, 900000, 350000
resolutions = 4000,3750,3500,3250,3000,2750,2500,2250,2000,1750,1500,1251,1000,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,0.5
srs = EPSG:21781
projection = +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel  +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs

[osm]
type = Mapnik
extension = png
mapfile = /home/sbrunner/workspace/mapnik/osm.xml
debug = no
metaTile = yes
avoid_edges = yes

Run tilecache:

/usr/sbin/tilecache_seed osm 0 27

Issue:

  • The test between images will be cut ...
Outils personnels