source: subversion/applications/utils/export/osmgoogleearth/osmgoogleearth.sh @ 20034

Last change on this file since 20034 was 6131, checked in by deelkar, 12 years ago

add support for single location from command line (bbox must be configured already)

  • Property svn:executable set to *
File size: 723 bytes
Line 
1#!/bin/bash
2
3if [[ -r ./osmgoogleearth.conf ]]; then
4  echo "reading config"
5else
6  echo "config \"osmgoogleearth.conf\" not found"
7  exit 1;
8fi
9
10. ./osmgoogleearth.conf
11 
12## check necessary config parameters
13
14if [[ -z "$make" ]]; then
15  make="make"
16fi
17
18## print some debug info:
19
20echo "configured fetch url: $url"
21
22if [ -n "$1" ]; then
23  locations="$*"
24fi
25
26for place in $locations; do
27  bbox=$(eval echo \$${place}_bbox)
28  if [ -z "$bbox" ]; then 
29    echo "warning: no data for bbox at $place";
30  fi
31  echo  "Fetching: $place, $bbox"
32  wget -q -O ${place}.osm "${url}${bbox}"
33  rm -f map.kmz data.osm
34  perl conv05/05to04.pl < ${place}.osm > data.osm
35  make
36  mv map.kmz ${place}.kmz
37  echo "created ${place}.kmz"
38done
39
Note: See TracBrowser for help on using the repository browser.