The Malaysian CRS monster
In Malaysia we prefer to use our national coordinate reference
system (CRS) for scientific purposes, rather than the
international UTM standard. A UTM zone boundary splits the Malay
Peninsula in two, and another boundary bisects Malaysian Borneo.
We encountered multiple problems using the Malaysian CRS with
QGIS and R software, problems which Mikael Rittri attributed to
Monster" back in 2011. Some solutions are described
The issues affect the following coordinate reference systems (CRSs):
though I will only deal in detail with the first of these.
ArcGIS has a CRS called Kertau RSO Malaya (m) as well as one called Kertau (RSO) RSO Malaya (m). I hope you spotted the difference! Very similar names for two different things. The second one ("(RSO) RSO") conforms to EPSG 3168. The first one does not: it has a different datum, a different ellipsoid, a different azimuth, and a different false easting; it doesn't conform to anything. (Thanks to Chee Pheng and the folks at WCS Malaysia for checking on this.)
If you are using ArcGIS, be really careful which of these you are using: look for (RSO) RSO in the name. You can check a shapefile by opening the *.prj file in a text editor (eg, Notepad) and looking at the start of the WKT:
Here the issue is two very different names but referring to the same thing. The Rectified Skew Orthomorphic (RSO) projection is the same as the Hotine Oblique Mercator projection.
In 1569 Geraldus Mercator published his map of the world, wrapping his flat map around the globe so that it touched along the equator; distortion is minimal at the equator but increases as you move away to the north or south. Wrapping the globe with the paper touching along a north-south meridian is a better solution if you live far from the equator: centre your map on the meridian of your choice, producing a Transverse Mercator map. If the area you are mapping doesn't run north-south, you can use any great circle as your centre line, resulting in an Oblique Mercator projection. First used for Switzerland, the Oblique Mercator projection was adapted for Malaysia in the 1940s by Martin Hotine, hence the name "Hotine Oblique Mercator". But Hotine himself named it "Rectified Skew Orthomorphic (RSO)", the term still generally used in Malaysia. See EPSG Guidance Note 7-2.
The two names are a problem when the projection details are written in Well-Known Text (WKT) format for shapefiles. ArcGIS uses the RSO name, QGIS and R, Hotine Oblique Mercator. The name included in the shapefile from one program is not recognised by another program.
To use the Oblique Mercator projection, you need to specify
the latitude and longitude of the centre of the map and the
angle of the centre line at the map centre; this is the Azimuth
Points are then mapped onto a u-v grid, with u being the
distance along the centre line and v the distance from the
centre line. In most cases, u = 0 corresponds to the map centre,
but Hotine chose to set u = 0 at the point where the centre line
crosses the equator, as this simplifies the calculations; this
is indicated in WKT by adding _Natural_Origin
to the projection name and in
The coordinates on the u-v grid must then be rotated to give the
usual x-y grid (this is the "Rectify" bit in RSO). If u = 0 is
the map centre, the rotation required is given by the Azimuth.
But if u = 0 is at the equator, the rotation is not the same,
and needs to be specified: this is "XY_Plane_Rotation" or "rectified_grid_angle"
When QGIS and R save shapefiles, the *.prj file does not specify "XY_Plane_Rotation" or "rectified_grid_angle".
However, QGIS saves an extra *.qpj file to the same location as the *.shp file, and this does have the correct parameters and the EPSG codes. When QGIS opens a shapefile it uses the *.qpj file instead of *.prj, so it reads correctly.
When a shapefile is opened in R with
Stop using shapefiles!
Use either the
GeoPackage format (if you are using QGIS or R) or
Geodatabase (for ArcGIS). ArcGIS 10.2.2 or later, QGIS
2.12.2 or later, and recent version of
Stop using the Kertau RSO Malaya CRS in ArcGIS!
And convert any existing files you have that use it to the proper Kertau (RSO) RSO Malaya CRS. I'm not an ArcGIS user, but it should be possible to write a Python script and do this as a batch job.
Don't manually assign a CRS to an unknown shapefile!
I fear that a lot of trouble has been caused by folks reading a shapefile using Kertau RSO Malaya into QGIS or R, and manually assigning EPSG 3168. This is incorrect, but will be used when the data are saved again. How many shapefiles on your system have gone through this process?
It may still be necessary to manually assign a CRS, but make sure you know what the correct CRS is.
Hat tip: Thanks to Fen and Chee Pheng for information and checking.
|Updated 26 March 2018 by Mike Meredith|