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

Last change on this file since 16531 was 16408, checked in by skunk, 11 years ago

Files missing (please don't ask me why)

  • Property svn:executable set to *
File size: 2.6 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"
58rm -f /tmp/cascadenik*png 2> /dev/null
59echo "BASE"
60echo "Layers"
61cd $ROOT_PATH/render
62./gen_layer.php > layers.mml
63./gen_land_point.php
64./gen_rotate_img.php
65cd $SOFTWARE_PATH/cascadenik
66$ROOT_PATH/src/combine_cascadenik.pl > $ROOT_PATH/render/base.xml
67echo "PT"
68cascadenik-compile.py $ROOT_PATH/render/overlay_pt.mml > $ROOT_PATH/render/overlay_pt.xml
69$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_pt.xml
70echo "CH"
71cascadenik-compile.py $ROOT_PATH/render/overlay_ch.mml > $ROOT_PATH/render/overlay_ch.xml
72$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_ch.xml
73echo "CAR"
74cascadenik-compile.py $ROOT_PATH/render/overlay_car.mml > $ROOT_PATH/render/overlay_car.xml
75$ROOT_PATH/src/update_xml.pl $ROOT_PATH/render/overlay_car.xml
76cd $ROOT_PATH
77$ROOT_PATH/src/gen_mss_from_wiki.php
78sleep 2
79
80echo "* Starting rendering"
81cd $ROOT_PATH/render
82nice ./render_all
83
84echo "* Finished"
Note: See TracBrowser for help on using the repository browser.