Opened 13 years ago

Closed 8 years ago

#1 closed defect (fixed)

New Zealand Map Grid transformation

Reported by: ironss Owned by: madair
Priority: major Milestone: future
Component: core Version:
Keywords: Cc:


Attached are three files implementing a proj4js projection for New Zealand Map Grid.

  • nzmg.js - implementation of the transformation algorithm
  • EPSG27200.js - definition for EPSG:27200 (NZMG)
  • EPSG4272.js - definition for EPSG:4272 (NZGD49)

Copyright is in my name, but I am happy to pass that on to OSGeo if necessary. Just ask. Licensed under GPL v3, but once again, I am happy to discuss a different license.

Please review this code and pass any feedback on what would need doing to incorporate it into the proj4js repository.

Thank you Stephen Irons


New Zealand Map Grid (NZMG) is a projection used to convert latitude and longitude to easting and northing coordinates in metres. It was designed to minimize the scale error over the land area of New Zealand and cannot be used elsewhere.

The New Zealand govnernment survey agency, LINZ (Land Information New Zealand) has published two series of maps covering the mainland areas of New Zealand.

  • 262-series is 1:250000
  • 260-series is 1:50000

These maps are available in printed form and are currently the only large-scale maps of New Zealand widely available to the general public. Vector data is also available.

Various commercial concerns have scanned these maps, or generated tiles from the vector data, and released products using these tiles. I have one of these products and want to use the tiles with OpenLayers?.

New Zealand Map Grid

New Zealand Map Grid was designed by Dr W. I. Reilly in 1973. Its official specification is published as New Zealand Map Grid, Department of Lands and Survey Technical Circular 1973/32. A scanned image of the publication is available at

It is also described in Conversion between Latitude and Longitude and New Zealand Map Grid, OSG Technical Report 4.1, 1998. This document is available at

NZMG is given EPSG code EPSG:27200. It is defined at as

  • "+proj=nzmg +lat_0=-41 +lon_0=173 +x_0=2510000 +y_0=6023150 +ellps=intl +datum=nzgd49 +units=m +no_defs"

Now, most of this is known to Proj4js code. However, the projections 'nzmg' is not know, and needs to be implemented.

Attachments (3)

nzmg.js (11.0 KB) - added by ironss 13 years ago.
Transformation for New Zealand Map Grid
EPSG27200.js (182 bytes) - added by ironss 13 years ago.
Definition for EPSG:27200
EPSG4272.js (96 bytes) - added by ironss 13 years ago.
Definition for EPSG:4272

Download all attachments as: .zip

Change History (9)

Changed 13 years ago by ironss

Attachment: nzmg.js added

Transformation for New Zealand Map Grid

Changed 13 years ago by ironss

Attachment: EPSG27200.js added

Definition for EPSG:27200

Changed 13 years ago by ironss

Attachment: EPSG4272.js added

Definition for EPSG:4272

comment:1 Changed 13 years ago by madair

Status: newassigned

comment:2 Changed 13 years ago by madair

added these to the library. There was a typo in d_lambda but that was corrected.

To include this in the release however you would have to let us change the license to LGPL to be consistent with the rest of the library.

It would also be good if you could provide a test point or two going from EPSG:27200 and 4272 to WGS84.

comment:3 Changed 13 years ago by ironss

I am quite happy to change the license to LGPL. Please use the same version of LGPL as the rest of the project.

I will add some test-points in the next few days and post them here.

Stephen Irons

comment:4 Changed 12 years ago by madair


comment:5 Changed 11 years ago by madair

Milestone: 1.0.1future

comment:6 Changed 8 years ago by madair

Resolution: fixed
Status: assignedclosed

closing this despite missing test points. SHould all be ported over to github

Note: See TracTickets for help on using tickets.