[Proj] quoting +nadgrids ?

Hamish hamish_b at yahoo.com
Mon Aug 30 23:20:40 EST 2010


I do believe I have finally cracked this nut.

(at least for cs2cs with spaces in the +nadgrids's pathname, but not for
gdalwarp +s_srs)


####
IN_PROJ=`g.proj -j | (
    IN_PROJ=
    while read line ; do
	IN_PROJ="$IN_PROJ '$line'"
    done
    echo "$IN_PROJ"
)`

#aka

mkdir "/tmp/nad test"
cp /usr/share/proj/nad/nzgd2kgrid0005.gsb "/tmp/nad test"

IN_PROJ="'+proj=nzmg' '+lat_0=-41' '+lon_0=173' '+x_0=2510000' '+y_0=6023150' \
   '+no_defs' '+a=6378388' '+rf=297' '+nadgrids=/tmp/nad test/nzgd2kgrid0005.gsb' '+to_meter=1'"



OUT_PROJ="+proj=longlat +datum=WGS84"

echo "2006797  5490896" | eval cs2cs `echo $IN_PROJ` +to `echo $OUT_PROJ`
#166d32'36.789"E 45d36'42.471"S 0.000



thanks,
Hamish



      


More information about the Proj mailing list