#!/bin/sh
#
# pnacmaps:
# Comparitive maps of countries on Dubya's shopping^W bombing list.
#
# Copyright (c) 2003 Chris Lightfoot. All rights reserved.
# Email: chris@ex-parrot.com; WWW: http://www.ex-parrot.com/~chris/
#
# $Id:$
#

for i in France_46_2 Iraq_33_44 Iran_32_53 Syria_35_38 "North Korea_40_127" Afghanistan_33_65 ; do

    name=$( echo $i | sed 's/_.*$//' )
    lat=$( echo $i | sed 's/^[A-Za-z0-9 ]*_//' | sed 's/_.*//' )
    lon=$( echo $i | sed 's/^.*[0-9]_//' )

    fname=$( echo $name | tr 'A-Z' 'a-z' | sed 's/ /-/g' )

    echo "$name   lat = $lat  lon = $lon $fname"

    west=$[ $lon - 11 ]
    east=$[ $lon + 10 ]
    north=$[ $lat + 8 ]
    south=$[ $lat - 8 ]
    R=-R$west/$east/$south/$north
    J=-JW$lon/2

    psbasemap $J $R -B5 -K > map-$fname.ps
    pscoast   $J $R -A100000 -G192/192/160 -S100/100/180 -O -K >> map-$fname.ps
    pscoast   $J $R -A100000 -Dl -W2 -N1/2  -O >> map-$fname.ps

    ./pstopng map-$fname.ps

done

