<div dir="ltr"><div>Dear all,</div><div><br></div><div>thanks heaps to Jochem and Even, this is great ! What a reactivity !</div><div>I managed to run my translation, rotation and back - all went well. <br></div><div><br></div><div>I thought the easiest would have been the z but somehow proj does not recognize my +zoff argument for an affine transformation.</div><div><br></div><div>For example in my below proj command, the +zoff is ignored...Have you encountered this before?<br></div><div><br></div><div>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</div><div><br></div><div>If you have a suggestion...<br></div><div>Thanks !</div><div>Best regards, <br></div><div><br></div><div>Pierre C<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 10 févr. 2020 à 10:23, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Pierre,<br>
<br>
> I am struggling to elaborate a pipeline with proj v6.3 that would transform<br>
> lat long coordinates to a local grid system.<br>
> From what I see, I have all the required parameters, so I did a 3 step<br>
> pipeline :<br>
> <br>
> 1/ transform from lat long wgs84 to projected using tmerc.<br>
> <br>
> 2/ run horizontal transformation which is a rotation around an origin - I<br>
> was thinking of using the the Molobadekas transform for this purpose<br>
> <br>
<br>
No, Molobadekas operates on cartesian/geocentric coordinates. Which explains <br>
that your pipeline doesn't work: the output of +proj=tmerc is projected <br>
coordinates which are rejected by +proj=molobadekas (admitedly error reporting <br>
is rather raw)<br>
<br>
You likely want to use<br>
<a href="https://proj.org/operations/transformations/affine.html" rel="noreferrer" target="_blank">https://proj.org/operations/transformations/affine.html</a><br>
instead . Can be used for translation and rotation. If you don't want to <br>
compute the combined affine transform matrix (*), the simplest is probably to <br>
chain it 3 times: one time to shift coordinates to the rotation center, one to <br>
apply the rotation, and the last time to undo the shift.<br>
<br>
Even<br>
<br>
(*) A formula for that at:<br>
<a href="https://www.euclideanspace.com/maths/geometry/affine/aroundPoint/matrix2d/index.htm" rel="noreferrer" target="_blank">https://www.euclideanspace.com/maths/geometry/affine/aroundPoint/matrix2d/<br>
index.htm</a><br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</blockquote></div>