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

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

convert-template: Update to add %PREFIX%

  • Property svn:executable set to *
File size: 2.0 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-template 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">.*</Parameter>|<Parameter name="host">%DBHOST%</Parameter>|
14
15
16# Since we normally run on localhost; we can delete these lines
17#      <Parameter name="port">5433</Parameter>     
18s/<Parameter name="port">.*<\/Parameter>/<Parameter name="port">%DBPORT%<\/Parameter>/
19
20
21#      <Parameter name="user">steve</Parameter>
22s/"user">.*</"user">%DBUSER%</
23
24# If I connect to a local socket i don't need any username
25# This only works with the newest Mapnik
26#/<Parameter name="user">steve<\/Parameter>/d
27
28#      <Parameter name="dbname">mapnik</Parameter>
29s/"dbname">.*</"dbname">%DBNAME%</
30
31
32#       <Parameter name="file">/Users/artem/world_boundaries/places</Parameter>
33s|/Users/artem/world_boundaries/|%WORLD_BOUNDARIES_DIR%/|
34s|/home/steve/world_boundaries/|%WORLD_BOUNDARIES_DIR%/|
35s|/home/jburgess/osm/data/world_boundaries/|%WORLD_BOUNDARIES_DIR%/|
36
37# PointSymbolizer file="/Users/artem/symbols/recycling.png" type="png" width="20" height="20" />
38s|/Users/artem/symbols/|%SYMBOLS_DIR%/|
39s|/home/steve/symbols/|%SYMBOLS_DIR%/|
40s|c:/mapnik/symbols/|%SYMBOLS_DIR%/|
41s|/home/jburgess/osm/svn.openstreetmap.org/applications/rendering/mapnik/symbols/|%SYMBOLS_DIR%/|
42
43# /home/jburges/osm/data/world_boundaries
44s|/home/jburges/osm/data/world_boundaries|%WORLD_BOUNDARIES_DIR%|
45
46# Add the database password prior to the name
47/<Parameter name="dbname">/ i \      <Parameter name="password">%DBPASS%</Parameter>
48
49#/<Parameter name="dbname">/ i \
50#      <Parameter name="host">%DBHOST%</Parameter>\
51#      <Parameter name="port">%DBPORT%</Parameter>\
52#      <Parameter name="user">%DBUSER%</Parameter>\
53#      <Parameter name="password">%DBPASS%</Parameter>
54
55# Use template for PostGIS table names
56s/planet_osm_/%PREFIX%_/g
Note: See TracBrowser for help on using the repository browser.