Skip to content

Commit

Permalink
eregular update cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
MaZderMind committed May 14, 2013
1 parent 33024a7 commit ae121ba
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh

START=`date +"%Y-%m-%d %H:%M:%S"`

echo "`date +"%Y-%m-%d %H:%M:%S"` downloading files"
wget -nv http://download.geofabrik.de/antarctica-latest.osm.pbf -O data/antarctica-latest.osm.pbf
wget -nv http://data.openstreetmapdata.com/land-polygons-complete-4326.zip -O data/land-polygons-complete-4326.zip
wget -nv http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip -O data/ne_10m_populated_places.zip
wget -nv http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_boundary_lines_land.zip -O data/ne_110m_admin_0_boundary_lines_land.zip

echo "`date +"%Y-%m-%d %H:%M:%S"` unpacking data"
unzip -o data/land-polygons-complete-4326.zip -d data
unzip -o data/ne_10m_populated_places.zip -d data
unzip -o data/ne_110m_admin_0_boundary_lines_land.zip -d data

echo "`date +"%Y-%m-%d %H:%M:%S"` importing database"
osm2pgsql --create --database antarctica --latlong --prefix ant --style=osm2pgsql.style --cache 2000 data/antarctica-latest.osm.pbf

echo "`date +"%Y-%m-%d %H:%M:%S"` re-generating mapnik xml"
./generate_xml.py --accept-none --dbname antarctica --prefix ant --epsg=4326 --world_boundaries=/osm2/polar/mapnik-stylesheets-polar/data/

echo "`date +"%Y-%m-%d %H:%M:%S"` rerender base tiles"
./render_polar_tiles.py --style=osm.xml --dir=../htdocs/tiles --minzoom=1 --maxzoom=6

echo "`date +"%Y-%m-%d %H:%M:%S"` rerender interesting zoom-tiles"
./render_polar_tiles.py --style=osm.xml --dir=../htdocs/tiles --minzoom=7 --maxzoom=18 --db=dbname=antarctica --only-interesting --only-interesting-list=../htdocs/interesting.json

echo "`date +"%Y-%m-%d %H:%M:%S"` updating view"
sed "s/###TIME###/`date +'%d.%m.%Y %H:%M:%S'`/g" <view.html >../htdocs/index.html

echo "`date +"%Y-%m-%d %H:%M:%S"` sending mail"
END=`date +"%Y-%m-%d %H:%M:%S"`
echo "Tile-Rendering auf http://polar.openstreetmap.de/ startete um $START und endete um $END" | mail -s "http://polar.openstreetmap.de/" peter@mazdermind.de

0 comments on commit ae121ba

Please sign in to comment.