<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="">
You can control the output format with the <a href="http://proj4.org/apps/proj.html#cmdoption-proj-f" class="">-f option</a>:
<div class=""><br class="">
</div>
<div class="">echo 4447802.078667 -1111950.519667 | proj -I -f %.3f +proj=sinu</div>
<div class=""><br class="">
</div>
<div class="">Works for both proj and cs2cs.</div>
<div class=""><br class="">
</div>
<div class="">/Kristian<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 27 Mar 2018, at 13:13, Juergen Stumpe <<a href="mailto:jstumpe.ho@gmail.com" class="">jstumpe.ho@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hi Kristian,<br class="">
<br class="">
Thanks for the fast reply and explanation. It works.<br class="">
<br class="">
Is there also an option to specify the output format? In the given<br class="">
example, the output format is DMS.<br class="">
<br class="">
To get the result in decimal degrees (DD), is there an PROJ parameter<br class="">
option to specify the output to be in DD,<br class="">
or is an additional, separate PROJ conversion needed, to convert from DMS to DD?<br class="">
<br class="">
Bye,<br class="">
<br class="">
Juergen<br class="">
<br class="">
On Tue, Mar 27, 2018 at 12:23 PM, Kristian Evers <<a href="mailto:kreve@sdfe.dk" class="">kreve@sdfe.dk</a>> wrote:<br class="">
<blockquote type="cite" class="">Hi Jürgen,<br class="">
<br class="">
Try this instead:<br class="">
<br class="">
$ echo 4447802.078667 -1111950.519667 | cs2cs +proj=sinu +to +proj=latlong<br class="">
+datum=WGS84<br class="">
40d34'27.915"E 10d3'18.399"S 0.000<br class="">
<br class="">
WGS84 is not an operation in PROJ. It is however a recognised as a datum<br class="">
that can be used in<br class="">
conjunction with an operation such as “latlong”.<br class="">
<br class="">
Since what you are doing is really just converting projected sinusoidal<br class="">
coordinates to it’s originating<br class="">
latitude and longitude you can also just do<br class="">
<br class="">
$ echo 4447802.078667 -1111950.519667 | proj -I +proj=sinu<br class="">
40d34'27.915"E 10d3'18.399”S<br class="">
<br class="">
To reach the same result.<br class="">
<br class="">
/Kristian<br class="">
<br class="">
On 27 Mar 2018, at 12:13, Juergen Stumpe <<a href="mailto:jstumpe.ho@gmail.com" class="">jstumpe.ho@gmail.com</a>> wrote:<br class="">
<br class="">
Hello,<br class="">
<br class="">
I'm trying to convert Modis meter values to WGS84 decimal degrees,<br class="">
using the PROJ4 command line, but I'm not able to set the parameters<br class="">
correctly.<br class="">
<br class="">
E.g. the command "echo 4447802.078667 -1111950.519667 | cs2cs<br class="">
+proj=sinu +to +proj=WSG84" fails with "projection initialization<br class="">
failurecause: Unknown error".<br class="">
<br class="">
Does anybody know how the define the PROJ4 command line properly, in<br class="">
order to achieve a conversion with parameters according the attached<br class="">
TWCC screen shot?<br class="">
<br class="">
Thanks in advance!<br class="">
<br class="">
Juergen<br class="">
<TWCC Screen Shot.PNG>_______________________________________________<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<br class="">
<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
Proj mailing list<br class="">
Proj@lists.maptools.org<br class="">
http://lists.maptools.org/mailman/listinfo/proj<br class="">
</blockquote>
_______________________________________________<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>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>