<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thanks for the clarification Even, that helped make this much more clear. I have much to learn!<br></div><div><br></div><div>It seems everything works properly in pyproj with the year added and upgrading to the newest version of PROJ.</div><div>Just an update.</div><div>>>> from pyproj import Transformer</div><div><br></div><div>Testing the correct solution for this thread:<br></div><div>>>> proj_str = (<br>...     "+proj=pipeline "<br>...     "+step +proj=unitconvert +xy_in=deg +xy_out=rad "<br>...     "+step +proj=cart +ellps=WGS84 "<br>...     "+step +init=ITRF2000:ITRF93 "<br>...     "+step +inv +proj=cart +ellps=WGS84 "<br>...     "+step +proj=unitconvert +xy_in=rad +xy_out=deg"<br>... )<br>>>> trans = Transformer.from_pipeline(proj_str)<br>>>> trans.transform(-117.61748591770593, 59.496749040316935, 329.39612, 1988)<br>(-117.61748584159756, 59.49674923319888, 329.3846729239449, 1988.0)</div><div><br></div><div>Just testing the cs2cs functionality (needed to add support for ITRF initialization in pyproj - PR for that submitted):<br></div><div>>>> crs_trans = Transformer.from_crs("ITRF2000", "ITRF93")<br>>>> crs_trans.transform(59.496749040316935, -117.61748591770593, 329.39612, 1988)<br>(59.49674923319888, -117.61748584159756, 329.3846729239449, 1988.0)</div><div><br></div><div>The updated version of the idea from earlier with strange results:<br></div><div>>>> trans = Transformer.from_pipeline("+init=ITRF2000:ITRF93")</div><div><div>>>> trans.transform(-117.61748591770593, 59.496749040316935, 329.39612, 0)<br>(-111.83893885919258, 59.900579376362764, 330.5682929011372, 0.0)<br></div>>>> trans.transform(-117.61748591770593, 59.496749040316935, 329.39612, 1988)<br>(-117.60478454066292, 59.50325042920626, 329.37522098600806, 1988.0)</div><div><br></div><div>Very informative thread.</div><div><br></div><div>Best,</div><div>Alan<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 3, 2019 at 3:10 PM Trey Stafford <<a href="mailto:trey.stafford@nsidc.org">trey.stafford@nsidc.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">All,<br>
<br>
Thanks for the feedback, this is super helpful!<br>
<br>
I was definitely missing the conversion to geocentric coordinates. Note <br>
that the proj4 docs do actually have a discussion about using pipelines <br>
for exactly this purpose, which I neglected to see before submitting <br>
this question: <a href="https://proj4.org/usage/transformation.html" rel="noreferrer" target="_blank">https://proj4.org/usage/transformation.html</a><br>
<br>
The only thing that I think needs to be changed in Even's example for my <br>
use case is the ellipsoid that is used. Instead of GRS80, my data are <br>
referenced to WGS84.<br>
<br>
I will also adjust my input to use the observation time as the fourth <br>
parameter. Each of my observations does have a datetime associated with <br>
it, so that should be easy enough to do.<br>
<br>
I'm going to do a bit more reading to ensure I understand each of these <br>
steps, but I think I have a better grasp now than I did!<br>
<br>
Thanks again, this is much appreciated!<br>
<br>
Trey<br>
<br>
On 5/3/19 12:58 PM, Even Rouault wrote:<br>
> On vendredi 3 mai 2019 13:01:01 CEST Alan Snow wrote:<br>
>> Hi Trey,<br>
>><br>
>> I tried it with pyproj and I got one answer:<br>
>>>>> from pyproj import Transformer<br>
>>>>> trans = Transformer.from_pipeline("+init=ITRF2000:ITRF93")<br>
>>>>> trans.transform(-117.61748, 59.4967, 329.396)<br>
>> (-111.83893294174032, 59.90053033616967, 330.56817290107665)<br>
>><br>
>> Then I used the `cct` tool and it seems to be slightly different:<br>
>> $ cct --version<br>
>> cct: Rel. 6.1.0, September 1st, 2019<br>
>> $ cct +init=ITRF2000:ITRF93<br>
>> -117.61748, 59.4967, 329.396<br>
>>      -117.6048        59.5032      329.3751           inf<br>
>><br>
>> Do you have a result you are expecting?<br>
> None of the above make sense (not sure why you don't get the same result as<br>
> pyproj as with cct. You must perform some additional conversion: unit ?). For<br>
> transformations between ITRF realizations, the difference between the input<br>
> and output coordinates should be very small (typically of the order of one<br>
> metre or less, ie in the range of 1e-6 to 1e-5 degree)<br>
><br>
> The +init=ITRF2000:ITRF93 definition uses a +proj=helmert operation which<br>
> operates in the cartesian/geocentric coordinate space. So you need to convert<br>
> from geographic to geocentric coordinates first.<br>
><br>
> $ echo "-117.61748, 59.4967, 329.396" | src/cct -d 7 +proj=pipeline \<br>
>    +step +proj=unitconvert +xy_in=deg +xy_out=rad \<br>
>    +step +proj=cart +ellps=GRS80 \<br>
>    +step +init=ITRF2000:ITRF93 \<br>
>    +step +inv +proj=cart +ellps=GRS80 \<br>
>    +step +proj=unitconvert +xy_in=rad +xy_out=deg<br>
><br>
>   -117.6174799     59.4967002   329.3845529           inf<br>
><br>
> Note also that being a time-dependent operation, you should generally supply<br>
> the observation time as a 4th coordinate. If you do not do so, +proj=helmert<br>
> will assume that the observation time is the same as the +t_epoch parameter,<br>
> here 1988.<br>
><br>
> You can also get the same result with PROJ 6 using the EPSG dataset with:<br>
><br>
> echo "59.4967 -117.61748 329.396 1988" | src/cs2cs -f "%.7f" ITRF2000 ITRF93<br>
> 59.4967002    -117.6174799 329.3845529 1988<br>
><br>
> ITRF2000 will resolve to EPSG:7909 (ITRF2000 Geographic3D CRS) and ITRF93 to<br>
> EPSG:7905 (ITRF93 Geographic3D CRS).<br>
> Note the lat, long order due to using EPSG definitions.<br>
> The explicit 1988 here is needed since otherwise it would default to 0 (bug I<br>
> just fixed in PROJ master / 6.1dev)<br>
><br>
> Even<br>
><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font style="font-family:arial,helvetica,sans-serif">Alan Snow</font><br></div></div></div></div></div></div></div></div>