source: subversion/applications/rendering/pdf-atlas/create.sh @ 34619

Last change on this file since 34619 was 3449, checked in by joerg, 12 years ago

update path to new structure

  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#!/bin/bash
2
3
4# ---------------------- GSHHS
5gshhs=gshhs_h
6echo "check $gshhs.b"
7mkdir -p ~/osm/GSHHS/
8#wget -nd -P ~/osm/GSHHS/ -nv  --mirror http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version1.2/$gshhs.b.gz
9wget -nd -P ~/osm/GSHHS/ -nv  --mirror http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/oldversions/$gshhs.b.gz
10
11if [ ~/osm/GHHS/$gshhs.b.gz" -nt ~/osm/GHHS/$gshhs.b" ] ; then
12    echo "Unpack ~/osm/GSHHS/$gshhs.b.gz"
13    gunzip -dc ~/osm/GSHHS/$gshhs.b.gz >~/osm/GSHHS/$gshhs.b
14fi
15
16
17for place_config in \
18    Config/places-germany.txt \
19    Config/places-bavaria*.txt \
20    Config/places-turkey*.txt \
21    Config/places-UK.txt \
22    Config/places-france.txt \
23    Config/places-france.txt \
24    Config/places-*.txt; do
25
26    csv_area=${place_config#*places-}
27    csv_area=${csv_area%.txt}
28
29    case $csv_area in
30        *germany*)
31            csv_area="germany"
32            ;;
33        *bavari*)
34            csv_area="germany"
35            ;;
36        *munich*)
37            csv_area="germany"
38            ;;
39        *UK*)
40            csv_area="uk"
41            ;;
42        *iow*)
43            csv_area="uk"
44            ;;
45        *france*)
46            csv_area="france"
47            ;;
48        *)
49            ;;
50    esac
51    osm_csv=$HOME/osm/planet/csv/osm-${csv_area}.csv
52
53
54    echo ""
55    echo "------------------------------------------------------------------"
56    echo "place: '$place_config' with area: '$csv_area'"
57    echo ""
58
59    if  echo $csv_area | grep \
60        -e world  \
61        -e europe \
62        ;then 
63        echo "Ignoring $place_config with $vsc_area"
64        continue
65    fi
66
67    OSM2CSV="../../utils/export/osm2csv/osm2csv.pl"
68
69    if [ `perl $OSM2CSV   --list-areas | grep $csv_area ` ]; then
70        echo "--> Update csv File for Area '$csv_area'"
71        osm2csv_cmd="perl $OSM2CSV --area=${csv_area} --update-only -v -v -v -v"
72        echo "$osm2csv_cmd"
73        $osm2csv_cmd
74    fi
75    if [ ! -s $osm_csv ] ; then
76        echo "Cannot find apropriate csv File ($osm_csv)"
77        continue
78        osm_csv=~/osm/planet/csv/osm.csv
79    fi
80   
81    places_name=${place_config/*\places-/}
82    places_name=${places_name%.txt}
83    pdf_name=~/osm/pdf-atlas/osm_atlas-${places_name}.pdf
84    #echo "CSV File: $pdf_name $osm_csv"
85    echo "------------------------------------------------------------------"
86    echo "Updating: " $places_name $pdf_name
87    create_atlas_cmd="./pdf-atlas.pl -v -v -d --config=Config/config.txt  --Data=$osm_csv --Places=$place_config"
88    echo "perl $create_atlas_cmd"
89    echo "     ..."
90    time perl $create_atlas_cmd
91done
Note: See TracBrowser for help on using the repository browser.