How do I create a proj4 string for a project grid?
The table below gives a list of the parameters that are used by to construct a proj4 string (see The PROJ projections page for full details). In most cases, you will only require a subset of these.
Parameter | Description |
---|---|
+a | Semimajor radius of the ellipsoid axis |
+axis | Axis orientation |
+b | Semiminor radius of the ellipsoid axis |
+ellps | Ellipsoid name |
+k | Scaling factor (deprecated) |
+k_0 | Scaling factor |
+lat_0 | Latitude of origin |
+lon_0 | Central meridian |
+lon_wrap | Center longitude to use for wrapping (see below) |
+over | Allow longitude output outside -180 to 180 range, disables wrapping |
+pm | Alternate prime meridian (typically a city name, see below) |
+proj | Projection name |
+units | meters, US survey feet, etc. |
+vunits | vertical units. |
+x_0 | False easting |
+y_0 | False northing |
See this page for a full list of proj projection names
An Example (PCG94)
As an example, let's create a proj4 string for the Landgate Perth Coastal Grid (PCG94) coordinate system (see https://www0.landgate.wa.gov.au/business-and-government/specialist-services/geodetic/project-grids for details). In this case, the data we have is
Perth | GDA94 (PCG94) |
---|---|
Central meridian | 115°49'00" |
Central scale factor | 0.99999906 |
False easting | 50 000.0 |
False northing | 3 800 000.0 |
Extent NW corner | S31°20'00" |
E115°26'30" | |
Extent SE corner | S33°25'00" |
E116°05'00" | |
Height limit | 165m |
Using these values, and noting that these project grids are based on a Transverse Mercator projection, the proj4 string is
+proj=tmerc +lat_0=0 +lon_0=115.8166666666667 +k=0.99999906 +x_0=50000 +y_0=3800000 +ellps=GRS80 +units=m