[PROJ] Transformation for local grid
Even Rouault
even.rouault at spatialys.com
Mon Feb 10 01:23:53 PST 2020
Pierre,
> I am struggling to elaborate a pipeline with proj v6.3 that would transform
> lat long coordinates to a local grid system.
> From what I see, I have all the required parameters, so I did a 3 step
> pipeline :
>
> 1/ transform from lat long wgs84 to projected using tmerc.
>
> 2/ run horizontal transformation which is a rotation around an origin - I
> was thinking of using the the Molobadekas transform for this purpose
>
No, Molobadekas operates on cartesian/geocentric coordinates. Which explains
that your pipeline doesn't work: the output of +proj=tmerc is projected
coordinates which are rejected by +proj=molobadekas (admitedly error reporting
is rather raw)
You likely want to use
https://proj.org/operations/transformations/affine.html
instead . Can be used for translation and rotation. If you don't want to
compute the combined affine transform matrix (*), the simplest is probably to
chain it 3 times: one time to shift coordinates to the rotation center, one to
apply the rotation, and the last time to undo the shift.
Even
(*) A formula for that at:
https://www.euclideanspace.com/maths/geometry/affine/aroundPoint/matrix2d/
index.htm
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the PROJ
mailing list