I have a point cloud whose coordinates are with respect to a local coordinate system. I also have ground control points with GPS values. Can I convert these local coordinates to a global coordinate system using PROJ.4 or any other library?
Any code in Python for the above stated problem would be a great help.
Best Answer
You seem to be looking to conduct an affine transformation between your local coordinate system and a georeferenced coordinate system.
Affine transforms underly all coordinate systems and can be represented by the matrix equation below.
However, you have a two-step problem.
Proj.4 excels at #2: transferring between georeferenced coordinate systems with known transformation matrices. It can't to my knowledge be used to find a transformation matrix from point data. However, you can do the entire thing easily by using some light linear algebra (a least-squares matrix inversion) in Numpy. I've used a version of this class for reducing data from several field studies:
It can be used as such:
projected_coordinates
is now in WGS84, UTM, or whatever coordinate system your recorded by your GPS. A major feature of this method is that it can be used with any number of tie points (3 or more) and gains accuracy the more tie points are used. You're essentially finding the best fit through all of your tie points.