[GRASS-dev] g.region print flags combination

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri Jan 5 16:39:32 EST 2007


Hello Maciek

On Fri, 5 Jan 2007, Maciej Sieczka wrote:

> Paul Kelly wrote:
>> On Thu, 4 Jan 2007, Maciej Sieczka wrote:
>
>>> Right. But it doesn't print the units information, which is present in
>>> PROJ.4-compatible output of eg. "epsg_tr.py -proj4 <code>". Shouldn't
>>> then g.proj -j include the units info too?
>
>> Maybe it should! Can you point me to some examples?
>
> Eg.
>
> $ epsg_tr.py -proj4 2180
> # ETRS89 / Poland CS92
> <2180> +proj=tmerc +lat_0=0 +lon_0=19 +k=0.999300 +x_0=500000
> +y_0=-5300000 +ellps=GRS80 +units=m +no_defs  <>
>                             ^
>                             |
> There units here -------------
>
> But, in a location created with "g.proj -c proj4='+init=epsg:2180'",
> units are missing from "g.proj -j" output:

Yes, that was a bug. Well spotted! It had been there for a few years. 
Fixed in CVS now. The reason it was missing: the use of PROJ in GRASS 
pre-dates PROJ's support of a unit factor. With "classic" PROJ, the units 
were always in metres anyway. A reminder of this can still be seen today 
in that the false easting and northing must always be given in metres, 
even if the unit of the projection is something different. So anyway GRASS 
handled the unit factor separately because PROJ didn't support it in the 
early 1990s. But if the PROJ output is for external use (as in g.proj -j) 
then we must include the unit factor as an external program might want to 
make use of it.

> $ g.proj -jf
> +proj=tmerc +lat_0=0 +lon_0=19 +k=0.999300 +x_0=500000 +y_0=-5300000
> +no_defs +a=6378137 +rf=298.257222101 +towgs84=0.000,0.000,0.000
>   ^
>   |-------------------------------
>                                  |
> Another thing - is no_defs on right place here? I *guess* it should be
> on the very end, ?.

I think it is OK anywhere. All it is doing is telling PROJ not to read any 
defaults from it's default file should something appear to be missing. The 
only parameters it should use are those supplied. If you see any 
documentation that suggests it needs to be at the end then of course, let 
me know.

Paul




More information about the grass-dev mailing list