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