5

I have a data set that uses a common projection, but has its own false easting and northing, and is rotated 315 degrees. I need to be able to work in this CRS and easily translate from one CRS to another, so using hacks such as CAD tools is not practical. I have a definition of it for MapInfo, which works fine. However, I need it to also work in QGIS and other software, which require .proj4 format. I have defined a CRS which gives the results I want, but when changing from one projection to another, there is an offset generated which is different depending on the projection being used.

The MapInfo definition is: "GRDMF", 3018, 31, 7, 173, -41, 2510000, 6023150, 7, 0.686785, 0.726871, -5539726.41, -0.726876, 0.686796, -2108424.34, -1000000, -1000000, 1000000, 1000000

The .proj4 definition I have is: +proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +no_defs +a=6378388 +rf=297 +ellps=GRS80 +datum=nzgd49 +nadgrids=nzgd2kgrid0005.gsb +towgs84=84,-22,209,-0,-0,-0,0 +to_meter=1

The projection is New Zealand Map Grid with NZGD1949. The CRS I need is based on NZMG projection, but rotated 315 about the coordinate 2310655.80 5535100.29, which translates to 70501.32 13497.54 in the custom CRS.

Some test coordinates are:

NZMG coords            Custom CRS
2292000 5539000        60522.871 29736.79
2296000 5552000        72720.155 35757.861
2330000 5527000        77898.623 -6126.353
2339000 5521000        79718.234 -16788.504
2333000 5511000        68329.450 -19294.963
2321000 5520000        66629.725 -4392.060

Any help would be appreciated. Thanks

Thomas
  • 51
  • 3
  • To summarise Thomas, you have shapefile that uses a local CRS and you wish to transform this to EPSG:27200 (NZGD49/New Zealand Map Grid)? It might help if you could let us have the local CRS coordinates for a few test points together with their corresponding EPSG:27200 coordinates. Nick. – nhopton Apr 17 '12 at 09:58
  • Thanks for your reply. I have updated the question with some test points. Kind regards. – Thomas May 28 '12 at 20:24

1 Answers1

2

Sorry about the delay in replying. The parameters for transforming from your custom CRS to EPSG:27200 appear to be as follows:

Scale x: 0.9999708285575817

Scale y: 0.9999269459420771

Rotation: 46.62502359527837

DX: 2223279.845

DY: 5516242.139

The trouble is that I can't make a custom QGIS/Proj4 CRS that uses these (it's possible, but I don't know how to do it, the rotation has me stumped).

I obtained the parameters using (free) OpenJump and using this it would be possible to affine your custom grid shapefiles to EPSG:27200 easily enough. There is a worked example of how to do this on the old QGIS forum, see:

Link to forum thread

near the bottom of the first page.

It would be even nicer if someone who's brighter than me could come up with a custom Proj4 parameter string :)

Regards, Nick.

nhopton
  • 6,983
  • 1
  • 19
  • 36
  • Unfortunately, the forum has gone :-( Do you have a local copy of the thread and can you insert the content here? – AndreJ Jan 23 '13 at 20:24
  • Ah, gone but not forgotten. Sorry, I don't have a local copy I'm afraid. N. – nhopton Jan 23 '13 at 22:17