<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Jean-Christophe,
<div class=""><br class="">
</div>
<div class="">You can do that transformation with PROJ, yes. I can see why you get confused though. It is not really apparent but to do this type of transformation cs2cs needs some hint that it is doing a change in reference frame (which this essentially is).
You can do that by adding +towgs84=0,0,0 to both CRS1 and CRS2. When I do that I get the following:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">$ echo 0 80 0 | cs2cs +proj=latlong +R=3396190 +towgs84=0,0,0 +to +proj=latlong +a=3396190 +b=3376200 +towgs84=0,0,0</div>
<div class="">0dE 80d6'51.824"N 19392.342</div>
</div>
<div class=""><br class="">
</div>
<div class="">It is not unreasonable to expect cs2cs to figure this out on it’s own. I’ll give it some thoughts the next couple of days and see if I can come up with a simple solution that handles this particular case.</div>
<div class=""><br class="">
</div>
<div class="">/Kristian</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 18 Aug 2018, at 21:30, Jean-Christophe Malapert <<a href="mailto:jcmalapert@gmail.com" class="">jcmalapert@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello,
<div class=""><br class="">
</div>
<div class="">I am quite new to the use of Proj4. I spend a few days to investigate a problem but I have no clue how to solve it. So that's why I am writing to you. I hope you will be able to answer me.</div>
<div class=""><br class="">
</div>
<div class="">I have 2 different <span class="" id=":18k.22" tabindex="-1" style="">CRS</span> for the same planet : one is based on<span style="background-color:rgb(250,210,207)" class=""> the sphere</span> (CRS1, radius=<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">3396190</span>)
and another one based on the ellipse (CRS2, <span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">
a=</span><span style="font-size:small;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">3396190 b=3376200</span>). When I give the (longitude, latitude) in the CRS1 as inputs (<span class="" id=":18k.27" tabindex="-1" style="">planetocentric</span> <span style="background-color:rgb(250,210,207)" class="">latitude
= planetographic</span> latitude), I want to get the <span class="" id=":18k.31" tabindex="-1" style="">
planetographic</span> latitude expressed in the CRS2. So, I wrote the following command :</div>
<div class="">cs2cs +<span class="" id=":18k.32" tabindex="-1" style="">proj</span>=<span class="" id=":18k.33" tabindex="-1" style="">latlong</span> +a=3396190 +b<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">=</span><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">3396190
+to <span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">+<span class="" id=":18k.34" tabindex="-1" style="">proj</span>=<span class="" id=":18k.35" tabindex="-1" style="">latlong</span> +a=</span><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">3396190
+b=3376200</span></span><br class="">
</div>
<div class=""><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class="">>
0 80 # longitude latitude</span></span></div>
<div class=""><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><span style="text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline" class=""><br class="">
</span></span></div>
<div class="">I get the following result "0dE<span style="white-space:pre" class="">
</span>80dN 0.000" . The latitude should change but it is not the case !!! Should I add some options ? Is it possible to do this kind of transformation with proj4 ?</div>
<div class=""><br class="">
</div>
<div class="">Thanks in advance,</div>
<div class="">Jean-Christophe</div>
</div>
_______________________________________________<br class="">
Proj mailing list<br class="">
<a href="mailto:Proj@lists.maptools.org" class="">Proj@lists.maptools.org</a><br class="">
http://lists.maptools.org/mailman/listinfo/proj</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>