From: Eddy Petrișor Date: Sun, 13 Sep 2009 15:09:56 +0000 (+0300) Subject: added gen_map to have the source complete X-Git-Url: https://repo.or.cz/osm-map-evolution.git/commitdiff_plain?ds=inline added gen_map to have the source complete --- diff --git a/gen_map b/gen_map new file mode 100755 index 0000000..aa509cf --- /dev/null +++ b/gen_map @@ -0,0 +1,21 @@ +#!/bin/sh + +MAPNIKDIR="${MAPNIKDIR-/home/eddy/usr/src/osm/mapnik/mapnik}" + +cd "$MAPNIKDIR" +echo "I: Generating map ..." +./generate_image.py && mkdir -p _maps + +[ "$1" ] && MAPNAME="$1" || MAPNAME=image.png +[ "$2" = "--caption" ] && CAPTION=yes || CAPTION=no + +echo "I: Cropping resulted map to desired size ..." +convert -crop 5000x3500+2350+5200 image.png _maps/image.png +if [ "$CAPTION" = "yes" ] ; then + convert -fill black -font helvetica -pointsize 300 -draw "text 100,300 \"Caracal $MAPNAME\"" _maps/image.png _maps/$MAPNAME.png +else + mv _maps/image.png _maps/$MAPNAME.png +fi +echo "I: Cleaning up ..." +rm -f _maps/image.png +echo "I: done"