[PROJ] Transformation for local grid
Pierre Chaponniere
pierrechapo at gmail.com
Mon Feb 10 03:07:31 PST 2020
Dear all,
thanks heaps to Jochem and Even, this is great ! What a reactivity !
I managed to run my translation, rotation and back - all went well.
I thought the easiest would have been the z but somehow proj does not
recognize my +zoff argument for an affine transformation.
For example in my below proj command, the +zoff is ignored...Have you
encountered this before?
echo 115.90428843055600 -1.92307681111111 126.014 0 | proj +proj=pipeline
+step +proj=tmerc +lat_0=-1.90355333888889 +lon_0=115.900912891667
+y_0=538.374 +x_0=5200.27 +ellps=GRS80 +step +proj=affine
+xoff=-5225.30897756133 +yoff=830.070127940344 +step +proj=affine
+s21=-0.0072010369955164367159 +s12=0.0072010369955164367159
+tscale=1.00001760710142 +step +proj=affine +xoff=5225.30897756133
+yoff=-830.070127940344 +step +proj=affine +xoff=-9.85881089465147
+yoff=-0.172038726321603 +zoff=-18.541
If you have a suggestion...
Thanks !
Best regards,
Pierre C
Le lun. 10 févr. 2020 à 10:23, Even Rouault <even.rouault at spatialys.com> a
écrit :
> 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
> <https://www.euclideanspace.com/maths/geometry/affine/aroundPoint/matrix2d/index.htm>
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200210/aff19d29/attachment.html>
More information about the PROJ
mailing list