[GRASS-dev] Re: [bug #4877] (grass) d.grid -g, ps.map: incorrect

On Wed, 19 Jul 2006, Hamish wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=4877
-------------------------------------------------------------------

..

"d.grid -g" and ps.map's geogrid command are not calculating the
correct grid lines for me. (lines are drawn 90m to the north)

Perhaps it is only doing the projection, and not the datum transform
?!!?

Looking at the code, this seems quite possible. I have applied a patch
in CVS - can you test? If it's working now, I expect we should be
able to apply a similar patch to ps.map.

umm, now it is twice as bad. the 'd.grid -g' line is now drawn 180m
north of the expected location.

For me (I've tried with a test NZMG/nzgd49 location) before the patch the lines were about 90m *south* of where they'd be expected to be from the d.where -l output, and after the patch they agree :confused: d.grid is supposed to show lines of latitude&longtiude on the current ellipsoid, not WGS84, right?

I take it that in this case the LL datum was the one missing?

Yes the way it was being done was ll was set as the projection and the ellipsoid parameters were copied over to the new parameters, but not the datum. I've double-checked and am fairly confident that particular problem is fixed now, but perhaps there was something else in the code that compensated for this bug and so something else needs changed? I'm not sure where to look.

Paul

>>> this bug's URL: http://intevation.de/rt/webrt?serial_num=4877
>-------------------------------------------------------------------
> ..
>>> "d.grid -g" and ps.map's geogrid command are not calculating the
>>> correct grid lines for me. (lines are drawn 90m to the north)

..

> umm, now it is twice as bad. the 'd.grid -g' line is now drawn 180m
> north of the expected location.

For me (I've tried with a test NZMG/nzgd49 location) before the patch
the lines were about 90m *south* of where they'd be expected to be
from the d.where -l output, and after the patch they agree :confused: d.grid
is supposed to show lines of latitude&longtiude on the current
ellipsoid, not WGS84, right?

aah, ok, that's it. The nzgd49 datum uses the int'l ellipsoid.

using "d.where -l" I see that "d.grid -g" does in fact lie in the
correct place (after applying your patch).

the rasterized nautical chart I was using as a backdrop is WGS84.
using "d.where -w" the printed rasterized grid lines match up.

I guess d.grid's default should be to use the current ellipsoid; should
d.grid get a -w flag too?

thanks,
Hamish

On Wed, 19 Jul 2006, Hamish wrote:

the rasterized nautical chart I was using as a backdrop is WGS84.
using "d.where -w" the printed rasterized grid lines match up.

I guess d.grid's default should be to use the current ellipsoid; should
d.grid get a -w flag too?

I don't see why not. I have added this functionality to the CVS HEAD version, and backported the bugfixes to d.grid and ps.map to the 6.1 release branch.

Paul