I loaded a shapefile layer into QGIS and assigned to CRS of EPSG:29873 (Timbalai 1948/ RSO Borneo (m))

enter image description here

I copied the Proj4 parameters from EPSG:29873 (above) and create a custom user defined coordinate systems (as below), later I intend to add in false easting and northing of 2 mil / 5 mil.

+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs

enter image description here enter image description here

Before modification (adding false easting and northing), in QGIS, I inserted a shp layer (same source) twice but assigned them to two different CRS for testing (one to EPSG:29873, and the other one to user defined USER:100001, Basemap using Bing Aerial with project CSR to EPSG:3857 WGS84/Pseudo Mercator). the result displayed quite surprisingly. the EPSG:298873 CRS locate the shp file correctly but NOT the user defined custom CRS (300+++ Km toward north from the correct one)! In fact they should displayed at the same location right, seeing that they are using the same Proj4 parameters!!!

Did I create the custom CRS wrongly? enter image description here

  • Can you save the shapefile in the user CRS, open the .prj file in a text editor, and insert its content here? – AndreJ Jan 11 '13 at 8:42
  • PROJCS["Hotine_Oblique_Mercator_Azimuth_Natural_Origin",GEOGCS["GCS_Everest (Sabah & Sarawak)",DATUM["D_unknown",SPHEROID["evrstSS",6377298.556,300.8017]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],PARAMETER["latitude_of_center",4],PARAMETER["longitude_of_center",115],PARAMETER["azimuth",53.31582047222222],PARAMETER["scale_factor",0.99984],PARAMETER["false_easting",590476.87],PARAMETER["false_northing",442857.65],UNIT["Meter",1]] – LUKIP Jan 11 '13 at 9:08
  • Original Shp prj. as below: PROJCS["Timbalai_1948_RSO_Borneo_Meters",GEOGCS["GCS_Timbalai_1948",DATUM["D_Timbalai_1948",SPHEROID["Everest_Definition_1967",6377298.556,300.8017]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Rectified_Skew_Orthomorphic_Natural_Origin"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Scale_Factor",0.99984],PARAMETER["Azimuth",53.31582047908623],PARAMETER["Longitude_Of_Center",115.0],PARAMETER["Latitude_Of_Center",4.0],PARAMETER["XY_Plane_Rotation",53.13010235415598],UNIT["Meter",1.0]] – LUKIP Jan 11 '13 at 9:11
  • 1
    At first glance, the Datum D_Timbalai_1948 is missing. So you might have lost the +towgs84 parameters. Also, the projection parameters are different. Is the newly saved Shapefile displaced as well? – AndreJ Jan 11 '13 at 9:26
  • Which shapefile aligns with Openlayers background, if project CRS is set to EPSG:3857? – AndreJ Jan 11 '13 at 9:38

I tried the same as you did, and could not replicate the error. But encountered that Qgis sometimes uses another CRS than that stored in the prj file. So take care which CRS is applied to the loaded layers. I did some grids in both 29873 and user defined (red), and they match perfectly.

Here http://www.georeference.org/forum/t96710 you find test road.zip data with the same prj file as yours, and that offsets to Google imagery only about 20 metres.


There are some differences in the proj strings I and you are using:

my QGIS Master 29873:

+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +gamma=53.13010236111111 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs

LUKIP QGIS Lisboa 29873:

+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +ellps=evrstSS +towgs84=-533.4,669.2,-52.5,0,0,4.28,9.4 +units=m +no_defs

SR 29873:

+proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +ellps=evrstSS +units=m +no_defs

Your proj string misses the gamma value. Thats the crazy thing about omerc: The projection axis is not a meridian (as most other merc projections), but with an angle to it. The coordinates are finally reprojected to have north up again. The SR string is even older, and misses the +towgs84 also.

The grid with my proj string in black and yours in red looks like this:

Borneo grid comparison

You have taken the proj string from QGIS Lisboa, probably Windows standalone installer. There is a bug in that installer, which prevents QGIS from synchronizing with the built-in GDAL projection database. Installing in a path without blanks (that is not in C:\Programs (x86)\ solves that issue, or using OSGEO4W installer. Master is only available with the later one.

Earlier versions of GDAL had a different way of handling the omerc projection, which was found to be inaccurate, and replaced with the handling of the gamma value. But now you have a new version of GDAL built inside QGIS, but the old proj string in the not-updated CRS database.

You can modify the CRS database, called srs.db, with spatialite GUI (because its a sqlite database as well), or reinstall QGIS to have correct handling of EPSG:29873.

  • i insert few dumpscreen into original post to show how i create the custom user defined CRS. please kindly help to inspect and hopefully i get the right procedure to do it. – LUKIP Jan 12 '13 at 1:38
  • i try using spatial reference tool to generate the Proj4 format for Timbalai 1948/ RSO Borneo (m) +proj=omerc +lat_0=4 +lonc=115 +alpha=53.31582047222222 +k=0.99984 +x_0=590476.87 +y_0=442857.65 +ellps=evrstSS +units=m +no_defs and assigned the shapefile to this new custom CRS. the output still cannot match the two CRS together. the new user defined CRS using spatial reference tool still go to North 300,+++Km – LUKIP Jan 12 '13 at 2:25
  • OK, no I got the differences, see my extended answer. By the way, your proj string has the correct false easting and northing already! – AndreJ Jan 12 '13 at 6:21
  • thanks for all the help, my layers locating at correct position now. for the 2000000, 5000000 false easting and northing, i modified your Proj4 format to +x_0=2590476.87 +y_0=5442857.65 and it display correctly as well. – LUKIP Jan 14 '13 at 6:38
  • any good tool apart from spatial reference to generate the proj4 string from WKT format for use in GIS FOSS? – LUKIP Jan 16 '13 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.