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

Last change on this file since 17224 was 14382, checked in by jonb, 11 years ago

Sync mapnik styles with osm.xml @ r14298. Fix convert-template to remove xx passwords

  • Property svn:executable set to *
File size: 2.4 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%/|
36s|/home/jburgess/world_boundaries/|%WORLD_BOUNDARIES_DIR%/|
37s|c:/boundaries/world_boundaries/|%WORLD_BOUNDARIES_DIR%/|
38
39# PointSymbolizer file="/Users/artem/symbols/recycling.png" type="png" width="20" height="20" />
40s|/Users/artem/symbols/|%SYMBOLS_DIR%/|
41s|/home/steve/symbols/|%SYMBOLS_DIR%/|
42s|c:/mapnik/symbols/|%SYMBOLS_DIR%/|
43s|/home/jburgess/osm/svn.openstreetmap.org/applications/rendering/mapnik/symbols/|%SYMBOLS_DIR%/|
44s|/home/jburgess/svn.openstreetmap.org/applications/rendering/mapnik/symbols/|%SYMBOLS_DIR%/|
45
46# /home/jburges/osm/data/world_boundaries
47s|/home/jburges/osm/data/world_boundaries|%WORLD_BOUNDARIES_DIR%|
48s|/home/jburgess/new-coast/coastlines|%WORLD_BOUNDARIES_DIR%|
49
50# Add the database password prior to the name
51#/<Parameter name="dbname">/ i \      <Parameter name="password">%DBPASS%</Parameter>
52
53#       <Parameter name="host">%DBHOST%</Parameter>\
54#      <Parameter name="port">%DBPORT%</Parameter>\
55#      <Parameter name="user">%DBUSER%</Parameter>\
56
57/<Parameter name="dbname">/ i \
58      <Parameter name="password">%DBPASS%</Parameter>
59
60# Use template for PostGIS table names
61s/planet_osm_/%PREFIX%_/g
62
63# Steve8 leaves these in the file
64/"password">martyn/d
65/"password">xxxxxx/d
Note: See TracBrowser for help on using the repository browser.