added gen_map to have the source complete
[osm-map-evolution.git] / gen_map
blobaa509cf73b4037426c8381be9b276b17730a6253
1 #!/bin/sh
3 MAPNIKDIR="${MAPNIKDIR-/home/eddy/usr/src/osm/mapnik/mapnik}"
5 cd "$MAPNIKDIR"
6 echo "I: Generating map ..."
7 ./generate_image.py && mkdir -p _maps
9 [ "$1" ] && MAPNAME="$1" || MAPNAME=image.png
10 [ "$2" = "--caption" ] && CAPTION=yes || CAPTION=no
12 echo "I: Cropping resulted map to desired size ..."
13 convert -crop 5000x3500+2350+5200 image.png _maps/image.png
14 if [ "$CAPTION" = "yes" ] ; then
15 convert -fill black -font helvetica -pointsize 300 -draw "text 100,300 \"Caracal $MAPNAME\"" _maps/image.png _maps/$MAPNAME.png
16 else
17 mv _maps/image.png _maps/$MAPNAME.png
19 echo "I: Cleaning up ..."
20 rm -f _maps/image.png
21 echo "I: done"