[GRASS-dev] datums not recognized by g.proj?
Paul Kelly
paul-grass at stjohnspoint.co.uk
Mon Oct 1 14:44:48 PDT 2012
Markus Neteler wrote:
>
> I do agree that getting the datum lost is bad. Perhaps we could enhance
> g.proj to write it to PROJ_INFO when using the "Select coordinate system" way
> of creating locations. Proof of concept:
>
> GRASS 6.4.3svn (newLocation2):~ > eval `g.gisenv`
>
> GRASS 6.4.3svn (newLocation2):~ > echo "datum: eur50" >>
> $GISDBASE/$LOCATION_NAME/$MAPSET/PROJ_INFO
I have just committed r53297 to trunk, which adds a new datum= option to
g.proj, which does something very similar to this. If a GRASS datum code
is given for the datum= option, it will override any datum in the input
co-ordinate system (or add one if it is missing).
So you can now do something like:
g.proj -c loc=spain proj4="+proj=utm +zone=30 +ellps=intl" \
datum=eur50 datumtrans=-1
which will correctly prompt for all the datum transformation options for
eur50. You can also do
g.proj datum=list
to get a list of all supported datums like g.setproj does, but in a more
easily parseable format similar to the output from datumtrans=-1.
Hope that helps a bit.
Paul
More information about the grass-dev
mailing list