I'm trying to define a custom CRS using the WKT Syntax. However when I do the projection I'm off by about 2km.
Here is my rotation point.
Local X and Y:
X: 4635.396 Y: 2397.085
MGA94 Zone50:
x: 560255.527
y: 7427753.462
Control Points:
Mine X | Mine Y| MGA 94(50) X| MGA 94(50) Y
2453.122|3210.002|563053.406|7431461.771
-1735.225|-853.24|557798.872|7428929.256
5663.648|7386.58|567416.171|7434410.368
12607.859|-1438.839|571218.306|7423848.605
8502.84|2620.24|568605.287|7428993.832
-2500.032|3457.767|558433.331|7433259.449
These are the steps I'm following base on WKT for local mine grid:
- Convert the MGA94 Zone50 (EPSG:28350) x and y to longitude and Latitude ("EPSG:4326"). I've used the python package pyproj
from pyproj import Transformer
transformer = Transformer.from_crs("EPSG:28350", "EPSG:4326", always_xy=True)
print(transformer.transform(564420.896, 7430150.547))
This gives the points
(117.62970383981178, -23.236582623614485)
- Base on the link above I've put used the WKT synta
PROJCS["Hotine_Oblique_Mercator_Azimuth_Center",
GEOGCS["GCS_GRS 1980(IUGG, 1980)",
DATUM["D_unknown",
SPHEROID["GRS80",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],
PARAMETER["latitude_of_center",-23.25839260829391]
PARAMETER["longitude_of_center", 117.58908484003899],
PARAMETER["azimuth",-18.39841101],
PARAMETER["scale_factor",0.999585495],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["Meter",1]]
- I then paste the code into QGIS custom CRS.
When I apply this custom CRS to a polygon layer in QGIS the polygon appears about 2km away from the actual location.
Can anyone offer any advice on how to achieve more accuracy?
Best Answer
Update - See python script below for an answer
Original String (Red)
gamma string by -18 (Green)
This results in a tilt in some axis:
alpha string by -18 (Green)
This results in another tilt:
So somewhere between these 4 parameters by using trial and error (or a python script) i should be able to figure this out.
EDIT: If anyone is curious I developed a nasty python script that lets you put an initial guess of coordinates and it finds the lowest error with the control points.
This leaves me the final Proj4 code of:
Second Edit: The comments below made me realize I can play with the scale -
I get an average error of 0.0645m