<div dir="ltr"><div>Hi<br></div><div><br></div><div>Can I use a formatter object from the class osgeo::proj::io::PROJStringFormatter many times?<br></div><div><br></div><div>in the transformation from LV_95 (EPSG:2056) to WGS84 the method "ConcatenatedOperation::operations()" is giving me two operations. If I use the same formatter object I get this:<br></div><div><br></div><div><span style="font-family:monospace">operation:<br></span></div><div><span style="font-family:monospace">+proj=pipeline<br>  +step +inv +proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1<br>        +x_0=2600000 +y_0=1200000 +ellps=bessel<br>  +step +proj=unitconvert +xy_in=rad +xy_out=deg<br>  +step +proj=axisswap +order=2,1<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">operation:<br></span></div><div><span style="font-family:monospace">+proj=pipeline<br>    +step +inv +proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333<br>          +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel<br>    +step +proj=push +v_3<br>    +step +proj=cart +ellps=bessel<br>    +step +proj=helmert +x=674.374 +y=15.056 +z=405.346<br>    +step +inv +proj=cart +ellps=WGS84<br>    +step +proj=pop +v_3<br>    +step +proj=unitconvert +xy_in=rad +xy_out=deg<br>    +step +proj=axisswap +order=2,1</span></div><div><br></div><div>What I was expecting is (what I get if I create a new formatter each time)<br></div><div><br></div><div><span style="font-family:monospace">operation:<br>+proj=pipeline<br>  +step +inv +proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1<br>        +x_0=2600000 +y_0=1200000 +ellps=bessel<br>  +step +proj=unitconvert +xy_in=rad +xy_out=deg<br>  +step +proj=axisswap +order=2,1<br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">operation:<br>+proj=pipeline<br>  +step +proj=axisswap +order=2,1<br>  +step +proj=unitconvert +xy_in=deg +xy_out=rad<br>  +step +proj=push +v_3<br>  +step +proj=cart +ellps=bessel<br>  +step +proj=helmert +x=674.374 +y=15.056 +z=405.346<br>  +step +inv +proj=cart +ellps=WGS84<br>  +step +proj=pop +v_3<br>  +step +proj=unitconvert +xy_in=rad +xy_out=deg<br>  +step +proj=axisswap +order=2,1</span></div><div><br></div><div>The only difference is to create the formatter object outside or inside the for loop that iterates ConcatenatedOperation::operations()</div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">auto formatter = osgeo::proj::io::PROJStringFormatter::create(osgeo::proj::io::PROJStringFormatter::Convention::PROJ_5, dbContext);<br>formatter->setMultiLine(true);</span></div><div><br></div><div>Is that expected? I do not see any method like "clear" or "reset" to remove any previous data.</div><div>Note: it is not a problem if it is intended (now that I know the effect). But it confused me trying to understand how ConcatenatedOperation::operations() works.</div><div><br></div><div>Thanks<br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__<br>Entre dos pensamientos racionales <br>hay infinitos pensamientos irracionales.<br><br></div></div></div>