<div dir="ltr">About proj_create_crs_to_crs, I think you need the geographic as lon-lat and radians (as Kristian suggested) for the input of proj_factors(). I do not know how to get that easily.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 25 Oct 2024 at 11:17, Roger Oberholtzer <<a href="mailto:roger.oberholtzer@gmail.com">roger.oberholtzer@gmail.com</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">On Fri, Oct 25, 2024 at 10:59 AM Javier Jimenez Shaw <<a href="mailto:j1@jimenezshaw.com" target="_blank">j1@jimenezshaw.com</a>> wrote:<br>
><br>
> This is just a guess based on what I remember from the implementation.<br>
><br>
> if it has the "+type=crs", it would be understood as a CRS (makes sense). In that case, it creates some auxiliary objects to compute the transformation from the geographic to the projected, and call itself with that transformation (yes, it is a recursive call).<br>
> Apparently the creation of those auxiliary objects to generate the transformation is more expensive than the computation of the factors themselves (it makes sense: the computation of the factors is "just" some mathematical operations, that the CPU can do very efficiently. Creating objects is something else).<br>
<br>
I suspected something like that must be going on. So I will continue<br>
my efforts at getting the required definition without the +type=crs.<br>
<br>
My thought is to do something like:<br>
<br>
PJ *tmp = proj_create("EPSG:5678");<br>
PJ_PROJ_INFO info = proj_pj_info(tmp);<br>
PJ *used = proj_create(info.definition);<br>
proj_destroy(tmp);<br>
<br>
Where 'used' will be used in the proj_factors() call. It seems the<br>
info.definition string does not contain the +type=crs . Is there no<br>
way to get the definition without the call ti proj_create? Like with<br>
the "EPSG:5678" directly?<br>
<br>
I'm still checking if this works.<br>
<br>
Thanks all for the feedback.<br>
<br>
<br>
<br>
-- <br>
Roger Oberholtzer<br>
</blockquote></div>