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

Last change on this file since 19109 was 17963, checked in by skunk, 10 years ago

Simplified creation of base-layer

  • promoted places-layer to improve rendering
  • Property svn:executable set to *
File size: 3.0 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
20
21echo "* Importing to Database"
22cd $SOFTWARE_PATH/osm2pgsql
23psql -d gis -c "drop database $DB_NAME"
24psql -d gis -c "create database $DB_NAME"
25psql -d $DB_NAME -c "create language plpgsql"
26psql -d $DB_NAME -f /usr/share/postgresql/8.3/contrib/_int.sql
27psql -d $DB_NAME -f /usr/share/postgresql-8.3-postgis/lwpostgis.sql
28psql -d $DB_NAME -f /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql
29./osm2pgsql -c -s -m -d $DB_NAME $ROOT_PATH/data/austria.osm.bz2
30./osm2pgsql -a -s -m -d $DB_NAME $ROOT_PATH/data/bulgaria.osm.bz2
31
32echo "- init db for osmosis"
33psql $DB_NAME < ~/src/pgsql_simple_schema.sql
34
35cd $ROOT_PATH/data/
36~skunkosm/software/osmosis-current/bin/osmosis --read-xml ~/data/austria.osm.bz2 --write-pgsql-dump
37cd pgimport
38echo "- drop unneeded geometry"
39cut -f1-3 nodes.txt > nodes1.txt
40mv nodes1.txt nodes.txt
41echo "- load db from osmosis"
42psql $DB_NAME < ~/src/pgsql_simple_load.sql
43
44cd $ROOT_PATH/data/
45~skunkosm/software/osmosis-current/bin/osmosis --read-xml ~/data/bulgaria.osm.bz2 --write-pgsql-dump
46cd pgimport
47echo "- drop unneeded geometry"
48cut -f1-3 nodes.txt > nodes1.txt
49mv nodes1.txt nodes.txt
50echo "- load db from osmosis"
51psql $DB_NAME < ~/src/pgsql_simple_load.sql
52
53echo "* Preprocessing data"
54cd $ROOT_PATH
55for i in src/sql/*.sql ; do echo "Processing $i ..." ; psql $DB_NAME < $i ; done
56
57echo "* Update style-sheet"
58export TMPDIR="/osm/`whoami`-style/`date +%Y%m%d-%H%M`"
59mkdir -p $TMPDIR
60echo "BASE"
61echo "Layers"
62cd $ROOT_PATH/render
63./gen_rotate_img.php
64./gen_layer.php > base.mml
65cascadenik-compile.py $ROOT_PATH/render/base.mml > $ROOT_PATH/render/base.xml
66$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/base.xml
67echo "PT"
68cd $ROOT_PATH/render
69convert -background none img/src/stop_p_back.svg img/stop_p_back.png
70convert -background none img/src/stop_p_for.svg img/stop_p_for.png
71convert -background none img/src/stop_n_back.svg img/stop_n_back.png
72convert -background none img/src/stop_n_for.svg img/stop_n_for.png
73convert -background none img/src/stop.svg img/stop.png
74cascadenik-compile.py $ROOT_PATH/render/overlay_pt.mml > $ROOT_PATH/render/overlay_pt.xml
75$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_pt.xml
76./create_rotate_style
77echo "CH"
78cascadenik-compile.py $ROOT_PATH/render/overlay_ch.mml > $ROOT_PATH/render/overlay_ch.xml
79$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_ch.xml
80echo "CAR"
81cascadenik-compile.py $ROOT_PATH/render/overlay_car.mml > $ROOT_PATH/render/overlay_car.xml
82$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_car.xml
83cd $ROOT_PATH
84$ROOT_PATH/src/gen_mss_from_wiki.php
85sleep 2
86
87echo "* Starting rendering"
88cd $ROOT_PATH/render
89nice ./render_all
90
91echo "* Finished"
Note: See TracBrowser for help on using the repository browser.