Skip to content

Instantly share code, notes, and snippets.

@tenomoto
Last active June 7, 2016 04:48
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 tenomoto/8d8d663553dff3ec9d3f64eb439062ad to your computer and use it in GitHub Desktop.
Save tenomoto/8d8d663553dff3ec9d3f64eb439062ad to your computer and use it in GitHub Desktop.
Draw a blank map of the world in polyconic projection with GMT
#!/bin/sh
ps=polyconic_coast.ps
w=2.0944c
proj=Poly/${w}
lon0=-180
lon1=`expr ${lon0} + 30`
reg=${lon0}/${lon1}/-90/90
gmt psbasemap -R${reg} -J${proj} -K -Bg10/g10 > ${ps}
gmt pscoast -R${reg} -J${proj} -O -K -W -B >> ${ps}
while [ ${lon0} -lt 120 ]; do
lon0=${lon1}
lon1=`expr ${lon0} + 30`
reg=${lon0}/${lon1}/-90/90
gmt psbasemap -X${w} -R${reg} -J${proj} -O -K -B >> ${ps}
gmt pscoast -R${reg} -J${proj} -O -K -W -B >> ${ps}
done
lon0=${lon1}
lon1=`expr ${lon0} + 30`
reg=${lon0}/${lon1}/-90/90
gmt psbasemap -X${w} -R${reg} -J${proj} -O -K -B >> ${ps}
gmt pscoast -R${reg} -J${proj} -O -W -B >> ${ps}
ps2pdf ${ps}
pdfcrop ${ps%s}df
rm ${ps} ${ps%s}df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment