[GRASSLIST:4582] Datum transform frustrations

Hi all,

I've been playing around with datums and projections
in order to get two maps to correspond to one another.
I've tried several things, but I always end up with the
the two maps about 2000m off when they should only
be around 200m off without transformation!
(Without transformation they are completely off)

Specifically I'm trying to convert a New Zealand Mapping
Grid raster file (from LENZ) based on datum nzgd49,
to New Zealand Transverse Mercator, datum nzgd2k.
The way I've tried doing it is by creating two locations, one
for as a source with nzgd49 data and the other as a destination.
Then I use r.proj within the destination to import layers
from the source location.

I would assume that one of the layers had error, but when I loaded
the two up in ArcView they show a 200m diff as expected before
transformation, and when I transform the data they align perfectly.

I've included information about the two layers below and it all
seems in order.

-PROJ_INFO-------------------------------------------------
name : New Zealand Map Grid
datum : nzgd49
towgs84 : 59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993
proj : nzmg
ellps : international
a : 6378388.0000000000
es : 0.0067226700
f : 297.0000000000
lat_0 : -41.0000000000
lon_0 : 173.0000000000
x_0 : 2510000.0000000000
y_0 : 6023150.0000000000
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1.0

and for the destination map:
-PROJ_INFO-------------------------------------------------
name : Transverse Mercator
datum : nzgd2k
towgs84 : 0.000,0.000,0.000
proj : tmerc
ellps : grs80
a : 6378137.0000000000
es : 0.0066943800
f : 298.2572221010
lat_0 : 0.0000000000
lon_0 : 173.0000000000
k_0 : 0.9996000000
x_0 : 1600000.0000000000
y_0 : 10000000.0000000000
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1.0

Any one have any ideas?

Thanks,
Joel

I've been playing around with datums and projections
in order to get two maps to correspond to one another.
I've tried several things, but I always end up with the
the two maps about 2000m off when they should only
be around 200m off without transformation!

I take it you mean datum transform.

(Without transformation they are completely off)

I take it you mean reprojection.

Specifically I'm trying to convert a New Zealand Mapping
Grid raster file (from LENZ) based on datum nzgd49,
to New Zealand Transverse Mercator, datum nzgd2k.
The way I've tried doing it is by creating two locations, one
for as a source with nzgd49 data and the other as a destination.
Then I use r.proj within the destination to import layers
from the source location.

Sounds right.
I've done this extensively without any problems (LINZ vectors, TM->MG).
It should be within a few meters. I've never tried the LENZ data.

I would assume that one of the layers had error, but when I loaded
the two up in ArcView they show a 200m diff as expected before
transformation, and when I transform the data they align perfectly.

200m is about right for using the wrong datum. Are you sure the LENZ
grids were not put together using the wrong datum? e.g. try loading the
grid into a NZMG location with the 2000 datum and see what happens.
Are there .prj files or some meta data containing projection info?
grasping at straws here.

I've included information about the two layers below and it all
seems in order.

-PROJ_INFO-------------------------------------------------
name : New Zealand Map Grid
datum : nzgd49
towgs84 : 59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993
proj : nzmg
ellps : international
a : 6378388.0000000000
es : 0.0067226700
f : 297.0000000000
lat_0 : -41.0000000000
lon_0 : 173.0000000000
x_0 : 2510000.0000000000
y_0 : 6023150.0000000000
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1.0

and for the destination map:
-PROJ_INFO-------------------------------------------------
name : Transverse Mercator
datum : nzgd2k
towgs84 : 0.000,0.000,0.000
proj : tmerc
ellps : grs80
a : 6378137.0000000000
es : 0.0066943800
f : 298.2572221010
lat_0 : 0.0000000000
lon_0 : 173.0000000000
k_0 : 0.9996000000
x_0 : 1600000.0000000000
y_0 : 10000000.0000000000
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1.0

those both look right.

Any one have any ideas?

You might check against a test coordinate:

Eastern entrance to Akaroa Harbour:

NZMG projection w/ NZGD49 datum
  2507512.60416667 5702150

NZTM projection w/ NZGD2k datum
  1597502.78125 5140557.1875

Lat/Lon w/ WGS84 datum
  172:58:08.07E 43:53:17.0925S

(give or take a few meters)

You should definitely get the LINZ vector coastline from NZTopoOnline:
  http://www.nztopoonline.linz.govt.nz

(Uses Arc/Web so horribly slow and mostly unusable... but you can
extract shape files eventually)

those are provided in NZTM/gd2k and you can figure out what's right and
what's wrong from there.

Hamish

Hamish wrote:

and for the destination map:
-PROJ_INFO-------------------------------------------------
name : Transverse Mercator
datum : nzgd2k
towgs84 : 0.000,0.000,0.000
proj : tmerc
ellps : grs80
a : 6378137.0000000000
es : 0.0066943800
f : 298.2572221010
lat_0 : 0.0000000000
lon_0 : 173.0000000000
k_0 : 0.9996000000
x_0 : 1600000.0000000000
y_0 : 10000000.0000000000
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1.0
   

You might check against a test coordinate:

Eastern entrance to Akaroa Harbour:

NZMG projection w/ NZGD49 datum
2507512.60416667 5702150

NZTM projection w/ NZGD2k datum
1597502.78125 5140557.1875

Lat/Lon w/ WGS84 datum
172:58:08.07E 43:53:17.0925S

(give or take a few meters)

You should definitely get the LINZ vector coastline from NZTopoOnline: http://www.nztopoonline.linz.govt.nz

(Uses Arc/Web so horribly slow and mostly unusable... but you can
extract shape files eventually)

those are provided in NZTM/gd2k and you can figure out what's right and
what's wrong from there.

Thanks Hamish :slight_smile:

Okay, I extracted the region around Akaroa from NZTopoOnline and
overlaid it. One of my files was significantly off.

Now I have a slightly different (or maybe related) problem:
The projection co-ordinates match when I use "d.where -d -w"
for both nzmg and tmerc projections, but the longitude and
latitude is way off (approximately, if not exactly, the same for both):

172.96917306E 43.87039362S

When I use ArcMap it shows the same coordinates, but the correct
lat/long values.

Joel

Please excuse my brief bout of insanity, I just
realised one was in degrees and the other as decimal.
Doh!

Now I have a slightly different (or maybe related) problem:
The projection co-ordinates match when I use "d.where -d -w"
for both nzmg and tmerc projections, but the longitude and
latitude is way off (approximately, if not exactly, the same for both):

172.96917306E 43.87039362S

When I use ArcMap it shows the same coordinates, but the correct
lat/long values.

Joel