[GRASS5] Re: [bug #3876] (grass) g.proj: proj4= fails, wkt= works partialy

Paul Kelly paul-grass at stjohnspoint.co.uk
Mon Feb 13 04:22:37 EST 2006


Hello Maciek

On Fri, 10 Feb 2006, Maciek Sieczka via RT wrote:

> BTW this issue with creating projection from EPSG code, which is OK now, I
> re-tested all the g.proj stuff which I complained about in my original bug
> report. Looks all works fine,

That's good to hear :) I'm sure there'll still be many more issues though.

> however I have one question about differences in
> units names in case when wkt or proj4 option is used.
>
> # When I override current projection using a wkt file, the projection units
> # are in small letters:

Does the WKT file specifically specify the units? If so then the value for 
"unit" will be taken from there. The WKT format doesn't have a way to 
specify a separate word for the plural like GRASS does so the letter 's' 
is simply added to the end for that. You can edit the PROJ_UNITS file 
later if you want.

I think that the unit names in PROJ_UNITS are only used for display 
purposes, e.g. in some d.* modules.

> # But when I specify the same projection in proj4 syntax unit and units names
> # start with a capital letter:

And also, American spelling. Well the PROJ-style string doesn't contain a 
word for the unit name, so presumably some default is coming from 
somewhere within GDAL/OGR. (I think I said this before but just to be 
clear, PROJ.4 isn't involved at all in parsing this string; it is all done 
in GDAL/OGR, which "interprets" the string.)

> Why the difference? Any problems possible due to this? Even if not, could the
> naming convention be unified?

The unit names are not coming from within GRASS so I don't think this is 
possible. I also don't see it as a big problem. You can also manually edit 
the PROJ_UNITS file if you really want to fix it. It is designed to be 
easily human-readable and editable.

It is just a by-product of the convenience of creating GRASS-native 
projection files from other sources, which don't always have as much 
information as the GRASS files do so "reasonable defaults" have to be 
filled in, and these can vary, as you have seen.

Paul




More information about the grass-dev mailing list