source: subversion/applications/rendering/mapnik/convert-template @ 6366

Last change on this file since 6366 was 6366, checked in by jonb, 12 years ago

convert-template: A small script to convert osm.xml -> osm-template.xml

  • Property svn:executable set to *
File size: 2.1 KB
Line 
1#!/bin/sed -f
2#
3# This script will convert from an osm.xml file back to osm-template.xml
4# You will probably need to tweak this file to reverse your customisations
5#
6# $ ./convert osm.xml > osm-template.xml-new
7#
8#
9
10
11# replace the server with the local postgis database
12# <Parameter name="host">dev.openstreetmap.org</Parameter>
13s|<Parameter name="host">dev.openstreetmap.org</Parameter>|<Parameter name="host">%DBHOST%</Parameter>|
14
15#      <Parameter name="host">dev.openstreetmap.org</Parameter>
16#  s/dev\.openstreetmap\.org/localhost/
17
18# Since we normally run on localhost; we can delete these lines
19#      <Parameter name="port">5433</Parameter>     
20s/<Parameter name="port">5433<\/Parameter>/<Parameter name="port">%DBPORT%<\/Parameter>/
21s/<Parameter name="port">5432<\/Parameter>/<Parameter name="port">%DBPORT%<\/Parameter>/
22
23
24
25#      <Parameter name="user">steve</Parameter>
26s/"user">steve/"user">%DBUSER%/
27s/"user">artem/"user">%DBUSER%/
28
29# If I connect to a local socket i don't need any username
30# This only works with the newest Mapnik
31#/<Parameter name="user">steve<\/Parameter>/d
32
33#      <Parameter name="dbname">mapnik</Parameter>
34s/"dbname">mapnik/"dbname">%DBNAME%/
35s/"dbname">planet_osm/"dbname">%DBNAME%/
36s/"dbname">steve/"dbname">%DBNAME%/
37
38
39#       <Parameter name="file">/Users/artem/world_boundaries/places</Parameter>
40s|/Users/artem/world_boundaries/|%WORLD_BOUNDARIES_DIR%/|
41s|/home/steve/world_boundaries/|%WORLD_BOUNDARIES_DIR%/|
42
43# PointSymbolizer file="/Users/artem/symbols/recycling.png" type="png" width="20" height="20" />
44s|/Users/artem/symbols/|%SYMBOLS_DIR%/|
45s|/home/steve/symbols/|%SYMBOLS_DIR%/|
46s|c:/mapnik/symbols/|%SYMBOLS_DIR%/|
47
48#/home/jburges/osm/svn.openstreetmap
49#s|/home/jburges/osm/svn.openstreetmap|/home/jburges/svn.openstreetmap|
50
51# /home/jburges/osm/data/world_boundaries
52s|/home/jburges/osm/data/world_boundaries|%WORLD_BOUNDARIES_DIR%|
53
54# bold font fails for me, use this instead
55#s/DejaVu Sans Bold/DejaVu Sans Book/
56
57# Add the database password prior to the name
58/<Parameter name="dbname">/ i \      <Parameter name="password">%DBPASS%</Parameter>
59
Note: See TracBrowser for help on using the repository browser.