<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div dir="ltr">Hi,</div></div><div dir="ltr"><br></div><div>With +datum=wgs84 cs2cs does not work, regardless of the inclusion of +towgs</div><div><br></div><div><div>./cs2cs +proj=latlon +datum=WGS84 +to +proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +datum=wgs84 +units=m +no_defs</div><div>Using to definition: proj=aea lat_1=20 lat_2=60 lat_0=40 lon_0=-96 datum=wgs84 units=m no_defs</div><div>Rel. 4.9.3, 15 August 2016</div><div><cs2cs>:</div><div>projection initialization failure</div><div>cause: unknown elliptical parameter name</div><div>program abnormally terminated</div></div><div><br></div><div><div>./cs2cs +proj=latlon +datum=WGS84 +to +proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +datum=wgs84 +units=m +no_defs +towgs84=0,0,0,0,0,0,0</div><div>Using to definition: proj=aea lat_1=20 lat_2=60 lat_0=40 lon_0=-96 datum=wgs84 units=m no_defs towgs84=0,0,0,0,0,0,0</div><div>Rel. 4.9.3, 15 August 2016</div><div><cs2cs>:</div><div>projection initialization failure</div><div>cause: unknown elliptical parameter name</div><div>program abnormally terminated</div></div><div><br></div><div>Adding +towgs to the cs2cs works correctly:</div><div><br></div><div><div>./cs2cs +proj=latlon +datum=WGS84 +to +proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +ellps=GRS80 +units=m +no_defs +towgs84=0,0,0,0,0,0,0</div><div>-135.197151 60.52163</div><div>-2102114.41<span style="white-space:pre">        </span>2828965.44 0.00</div></div><div><br></div><div>Cheers</div><div>Chris</div><div><br></div></div></div></div></div></div>
<br><div class="gmail_quote">On 13 October 2017 at 17:17, Melita Kennedy <span dir="ltr"><<a href="mailto:mkennedy2@earthlink.net" target="_blank">mkennedy2@earthlink.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Chris,<br>
<br>
Do you still get the error message if you change the output '+ellps=grs80' to '+datum=wgs84'? You also omitted the '+towgs84' parameter when you tested using cs2cs. The grs80 and wgs84 flattening are almost equal so I wonder if GDAL is doing some calculation connected to the '+towgs84' parameter using the grs80 and wgs84 ellipsoids incorrectly.<br>
<br>
Melita<br>
<br>
-----Original Message-----<br>
<br>
>Date: Fri, 13 Oct 2017 22:00:22 +0000<br>
>From: Chris Marsh <<a href="mailto:chris.marsh@usask.ca">chris.marsh@usask.ca</a>><br>
>Subject: Re: [Proj] Failed to initialize PROJ.4 with "..."<br>
>To: PROJ.4 and general Projections Discussions<br>
> <<a href="mailto:proj@lists.maptools.org">proj@lists.maptools.org</a>><br>
><br>
>Hi,<br>
><br>
>Thanks for the thoughts.<br>
>Yes ERROR 6 is the GDAL wrapper error.<br>
><br>
><br>
>On the computer that 'works':<br>
>cs2cs +proj=latlon +datum=WGS84 +to +proj=aea +lat_1=20 +lat_2=60 +lat_0=40<br>
>+lon_0=-96 +ellps=GRS80 +units=m +no_defs<br>
>-135.197151 60.52163<br>
>-2102114.41 2828965.44 0.00<br>
><br>
>On the computer that doesn't<br>
><br>
>./cs2cs +proj=latlon +datum=WGS84 +to +proj=aea +lat_1=20 +lat_2=60<br>
>+lat_0=40 +lon_0=-96 +ellps=GRS80 +units=m +no_defs<br>
>-135.197151 60.52163<br>
>-2102114.41 2828965.44 0.00<br>
><br>
>So that seems like that works....<br>
><br>
>Would this point to GDAL being 100% the culprit?<br>
><br>
>Cheers<br>
>Chris<br>
><br>
>On 13 October 2017 at 21:23, Kristian Evers <<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a>> wrote:<br>
><br>
>> Chris,<br>
>><br>
>> The "ERROR: 6" is GDAL. I am not sure if GDAL is forwarding the error code<br>
>> from PROJ.4, although I don't think so since PROJ.4 error codes are<br>
>> negative. This is why I want you to reproduce the problem just by using<br>
>> PROJ.4.<br>
>> Try running "cs2cs +proj=latlon +datum=WGS84 +to +proj=aea +lat_1=20<br>
>> +lat_2=60 +lat_0=40 +lon_0=-96 +ellps=GRS80 +units=m +no_defs" on the<br>
>> computer in question. If it fails the problem is definitely related to<br>
>> PROJ.4.<br>
>><br>
>> Kristian<br>
>><br>
>> ______________________________<wbr>__________<br>
>> Fra: <a href="mailto:proj-bounces@lists.maptools.org">proj-bounces@lists.maptools.<wbr>org</a> [<a href="mailto:proj-bounces@lists.maptools.org">proj-bounces@lists.maptools.<wbr>org</a>]<br>
>> p&#229; vegne af stevejking [<a href="mailto:stevejking@talktalk.net">stevejking@talktalk.net</a>]<br>
>> Sendt: 13. oktober 2017 22:41<br>
>> Til: <a href="mailto:proj@lists.maptools.org">proj@lists.maptools.org</a><br>
>> Emne: Re: [Proj] Failed to initialize PROJ.4 with "..."<br>
>><br>
>> Kristian,<br>
>> Is that a Proj4 error code?<br>
>><br>
>> The Proj4 codes seem more specific. My reference says code 6 is "effective<br>
>> eccentricity = 1."<br>
>><br>
>> Is it even a GDAL error code?<br>
>><br>
>> Steve<br>
>><br>
>><br>
>> Kristian Evers-2 wrote<br>
>> > Chris,<br>
>> ><br>
>> > It would be beneficial if you could try to reproduce this problem just<br>
>> > using PROJ.4 and a few simple coordinates. Either on the command line<br>
>> with<br>
>> > a call to cs2cs or by a small C program. I tried initialising the<br>
>> > projection with a recent version of PROJ.4 without problems and I can't<br>
>> > see any obvious problem in the proj string. It is likely that if this<br>
>> > indeed is a bug in PROJ.4 that it has already been fixed.<br>
>> ><br>
>> > /Kristian<br>
>> ><br>
>> > ______________________________<wbr>__<br>
>> > Fra:<br>
>><br>
>> > proj-bounces@.maptools<br>
>><br>
>> > [<br>
>><br>
>> > proj-bounces@.maptools<br>
>><br>
>> > ] p? vegne af Chris Marsh [<br>
>><br>
>> > chris.marsh@<br>
>><br>
>> > ]<br>
>> > Sendt: 13. oktober 2017 17:56<br>
>> > Til:<br>
>><br>
>> > proj@.maptools<br>
>><br>
>> > Emne: [Proj] Failed to initialize PROJ.4 with "..."<br>
>> ><br>
>> > Hi,<br>
>> ><br>
>> > ...<br>
>> ><br>
>> > ERROR 6: Failed to initialize PROJ.4 with `+proj=aea +lat_1=20 +lat_2=60<br>
>> > +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0<br>
>> > +units=m +no_defs'.<br>
>> ><br>
>> > ...Cheers<br>
>> > Chris<br>
>> ><br>
>> ><br>
>> ><br>
>> > ______________________________<wbr>_________________<br>
>> > Proj mailing list<br>
>><br>
>> > Proj@.maptools<br>
>><br>
>> > <a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a><br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">http://lists.maptools.org/<wbr>mailman/listinfo/proj</a><br>
</blockquote></div><br></div></div>