Skip to content

Instantly share code, notes, and snippets.

@komasaru
Created May 27, 2017 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save komasaru/e755bcadb0da302db38fb188e38927a7 to your computer and use it in GitHub Desktop.
Save komasaru/e755bcadb0da302db38fb188e38927a7 to your computer and use it in GitHub Desktop.
Bash script to draw maps with Azimuthal Equidistant Projection.
#! /bin/bash
#
FNAME_1="imgs/JAPAN_AEP_1.ps"
FNAME_2="imgs/JAPAN_AEP_2.ps"
DPI=100
LAT=35.468056
LON=133.048611
TITLE="Azimuthal Equidistant Projection"
# GMT 設定
gmtset PS_MEDIA = Custom_20cx22c
# 正距方位図法-1
pscoast -P -JE$LON/$LAT/18 -R-180/180/-90/90 -Dl -Wthinnest,black -Gwheat -S200/255/255 -Bg10:."$TITLE": -X1 -Y1 -K > $FNAME_1
echo $LON $LAT | psxy -JE -R -S+18c -Wthin,red -O >> $FNAME_1
ps2raster $FNAME_1 -Tg -Qt -Qg -E$DPI
# 正距方位図法-2
pscoast -P -JE$LON/$LAT/17 -R120/20/-90/20r -Dl -Wthinnest,black -Gwheat -S200/255/255 -Bg10a30:."$TITLE": -X1.5 -Y1.5 -K > $FNAME_2
echo $LON $LAT | psxy -JE -R -S+34c -Wthin,red -O >> $FNAME_2
ps2raster $FNAME_2 -Tg -Qt -Qg -E$DPI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment