Processing/LLToBNG: ll2bng.sh

File ll2bng.sh, 399 bytes (added by benj, 11 years ago)
Line 
1# Script to convert lat/long into British National Grid co-ordinates
2#
3# Usage: ll2bng.sh latitude longitude
4#
5# Will accept any lat/long input format accepted by proj.4 (decimal degrees, DDdMM.MMM or DDdMM'SS.SS")
6
7COORD=`proj +proj=tmerc +ellps=airy +lat_0=49 +lon_0=-2 +x_0=400000 +y_0=-100000 +k=0.9996012717 << eof
8$2 $1
9eof
10`
11echo "TM Coords: "$COORD
12
13python ~arsf/usr/bin/bnglookup.py $COORD