source: subversion/sites/www.openstreetbrowser.org/do_all_test @ 19771

Last change on this file since 19771 was 19572, checked in by skunk, 10 years ago

Get rid of 'world_boundaries', only use shoreline_300 and processed_p

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1#!/bin/bash
2
3# This script is used to generate a test rendering
4# Only a single database is used
5
6killall generate_tiles.py
7sleep 1
8
9export ROOT_PATH=/osm/skunkosm
10export SOFTWARE_PATH=/osm/osm/software
11export DB_NAME=skunk
12
13echo "* Delete old tiles"
14rm -r $ROOT_PATH/data/tiles/*
15
16echo "* Download new OSM-File"
17cd $ROOT_PATH/data
18wget -N http://download.geofabrik.de/osm/europe/austria.osm.bz2
19wget -N http://download.geofabrik.de/osm/europe/bulgaria.osm.bz2
20wget -N -nv http://hypercube.telascience.org/~kleptog/processed_p.zip
21wget -N -nv http://tileserv.openstreetmap.org/shoreline_300.tar.bz2
22
23echo "* Importing to Database"
24echo "- Shapefiles"
25cd $ROOT_PATH/data
26mkdir world_boundaries/
27unzip processed_p.zip
28mv coastlines/* world_boundaries/
29rmdir coastlines
30tar xjf shoreline_300.tar.bz2 -C world_boundaries
31
32cd $SOFTWARE_PATH/osm2pgsql
33psql -d gis -c "drop database $DB_NAME"
34psql -d gis -c "create database $DB_NAME"
35psql -d $DB_NAME -c "create language plpgsql"
36psql -d $DB_NAME -f /usr/share/postgresql/8.3/contrib/_int.sql
37psql -d $DB_NAME -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql
38psql -d $DB_NAME -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql
39./osm2pgsql -c -s -m -d $DB_NAME -S $ROOT_PATH/render/osm2pgsql.style $ROOT_PATH/data/austria.osm.bz2
40./osm2pgsql -a -s -m -d $DB_NAME -S $ROOT_PATH/render/osm2pgsql.style $ROOT_PATH/data/bulgaria.osm.bz2
41
42echo "- init db for osmosis"
43psql $DB_NAME < ~/src/pgsql_simple_schema.sql
44
45cd $ROOT_PATH/data/
46~skunkosm/software/osmosis-current/bin/osmosis --read-xml ~/data/austria.osm.bz2 --write-pgsql-dump
47cd pgimport
48echo "- drop unneeded geometry"
49cut -f1-3 nodes.txt > nodes1.txt
50mv nodes1.txt nodes.txt
51echo "- load db from osmosis"
52psql $DB_NAME < ~/src/pgsql_simple_load.sql
53
54cd $ROOT_PATH/data/
55~skunkosm/software/osmosis-current/bin/osmosis --read-xml ~/data/bulgaria.osm.bz2 --write-pgsql-dump
56cd pgimport
57echo "- drop unneeded geometry"
58cut -f1-3 nodes.txt > nodes1.txt
59mv nodes1.txt nodes.txt
60echo "- load db from osmosis"
61psql $DB_NAME < ~/src/pgsql_simple_load.sql
62
63echo "* Preprocessing data"
64cd $ROOT_PATH
65for i in src/sql/*.sql ; do echo "Processing $i ..." ; psql $DB_NAME < $i ; done
66
67echo "* Update style-sheet"
68export TMPDIR="/osm/`whoami`-style/`date +%Y%m%d-%H%M`"
69mkdir -p $TMPDIR
70echo "BASE"
71echo "Layers"
72cd $ROOT_PATH/render
73./gen_rotate_img.php
74./gen_layer.php > base.mml
75cascadenik-compile.py $ROOT_PATH/render/base.mml > $ROOT_PATH/render/base.xml
76$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/base.xml
77echo "PT"
78cd $ROOT_PATH/render
79convert -background none img/src/stop_p_back.svg img/stop_p_back.png
80convert -background none img/src/stop_p_for.svg img/stop_p_for.png
81convert -background none img/src/stop_n_back.svg img/stop_n_back.png
82convert -background none img/src/stop_n_for.svg img/stop_n_for.png
83convert -background none img/src/stop.svg img/stop.png
84cascadenik-compile.py $ROOT_PATH/render/overlay_pt.mml > $ROOT_PATH/render/overlay_pt.xml
85$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_pt.xml
86./create_rotate_style
87echo "CH"
88cascadenik-compile.py $ROOT_PATH/render/overlay_ch.mml > $ROOT_PATH/render/overlay_ch.xml
89$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_ch.xml
90echo "CAR"
91cascadenik-compile.py $ROOT_PATH/render/overlay_car.mml > $ROOT_PATH/render/overlay_car.xml
92$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_car.xml
93cd $ROOT_PATH
94$ROOT_PATH/src/gen_mss_from_wiki.php
95sleep 2
96
97echo "* Starting rendering"
98cd $ROOT_PATH/render
99nice ./render_all
100
101echo "* Finished"
Note: See TracBrowser for help on using the repository browser.