#!/bin/bash # Make an orthographic map of all our locals # Base map: pscoast \ -K \ -R-12/50/30/72 \ -JG12/40/10c \ -P \ -G41/22/111 \ -S153/204/255 \ -Di > ortho.eps # Make coordinate file for stars: cat coordinates.txt | \ awk 'BEGIN{FS=":"}{ sub("[^0-9.-]", "", $4); print $4 " " $3 }' > coordinates.tmp psxy \ -R -J -O -K \ -Sa0.1c \ -Gyellow \ coordinates.tmp >> ortho.eps # Close EPS file by writing dummy coordinate pair: echo "9999 9999" | psxy -J -R -O >> ortho.eps # Make PDF, this corrects the bounding box: epstopdf ortho.eps # Rasterize with Ghostscript gs \ -r200 \ -sDEVICE=png16m \ -dGraphicsAlphaBits=4 \ -dSAFER -dBATCH -dNOPAUSE \ -sOutputFile=ortho.png \ ortho.pdf # Reduce colour pngquant 16 ortho.png mv ortho-fs8.png ortho.png # Clean up rm ortho.eps rm ortho.pdf rm coordinates.tmp