This turned out to be a porting bug in the StereographicAzimuthal projection.  It's now fixed in SVN.<br><br>Also fixed is a bug in the Robinson projection (PROJ4 #133).<br><br><div class="gmail_quote">On Mon, Nov 19, 2012 at 6:14 AM, Krzysztof Czainski <span dir="ltr"><<a href="mailto:1czajnik@gmail.com" target="_blank">1czajnik@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<div><br></div><div>I am trying to convert coordinates XY <-> LongLat. All points are expected to be near a specified point, let's say LongLat(21,52).</div>
<div><br></div><div><div>Converting LongLat -> XY works for me, but XY -> LongLat throws org.osgeo.proj4j.ConvergenceFailureException. Here are the projection parameters:</div>

<div><br></div><div>final String fromParams = "+proj=stere +ellps=WGS84 +lon_0=21.00000000 +lat_0=52.00000000 +no_defs";</div><div>final String toParams = "+proj=longlat +ellps=WGS84 +no_defs"; </div>

</div>
<div><br></div><div>The attached MyTest.java demonstrates my problem. Running it prints:</div><div><br></div><div><div>.E</div><div>Time: 0,047</div><div>There was 1 error:</div><div>1) test(org.osgeo.proj4j.MyTest)org.osgeo.proj4j.ConvergenceFailureException: Iteration didn't converge</div>


<div><span style="white-space:pre-wrap">  </span>at org.osgeo.proj4j.proj.StereographicAzimuthalProjection.projectInverse(StereographicAzimuthalProjection.java:240)</div><div><span style="white-space:pre-wrap">      </span>at org.osgeo.proj4j.proj.Projection.inverseProjectRadians(Projection.java:308)</div>


<div><span style="white-space:pre-wrap">  </span>at org.osgeo.proj4j.BasicCoordinateTransform.transform(BasicCoordinateTransform.java:119)</div><div><span style="white-space:pre-wrap">        </span>at org.osgeo.proj4j.MyTest.test(MyTest.java:27)</div>


<div><span style="white-space:pre-wrap">  </span>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</div><div><span style="white-space:pre-wrap">   </span>at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</div>


<div><span style="white-space:pre-wrap">  </span>at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</div><div><span style="white-space:pre-wrap">       </span>at org.osgeo.proj4j.MyTest.main(MyTest.java:9)</div>


<div><br></div><div>FAILURES!!!</div><div>Tests run: 1,  Failures: 0,  Errors: 1</div><div><br></div></div><br></blockquote></div><br>