[Proj4j] XY -> LongLat proj=stere: org.osgeo.proj4j.ConvergenceFailureException

Martin Davis mtnclimb at gmail.com
Mon Nov 19 09:28:50 PST 2012


Hmmm, probably a bug - but I'll have to dig into it to see.

Can you try the same conversion in Proj4 to see if it works?  And it would
be helpful to have the expected output.


On Mon, Nov 19, 2012 at 6:14 AM, Krzysztof Czainski <1czajnik at gmail.com>wrote:

> Hello,
>
> I am trying to convert coordinates XY <-> LongLat. All points are expected
> to be near a specified point, let's say LongLat(21,52).
>
> Converting LongLat -> XY works for me, but XY -> LongLat throws
> org.osgeo.proj4j.ConvergenceFailureException. Here are the projection
> parameters:
>
> final String fromParams = "+proj=stere +ellps=WGS84 +lon_0=21.00000000
> +lat_0=52.00000000 +no_defs";
> final String toParams = "+proj=longlat +ellps=WGS84 +no_defs";
>
> The attached MyTest.java demonstrates my problem. Running it prints:
>
> .E
> Time: 0,047
> There was 1 error:
> 1)
> test(org.osgeo.proj4j.MyTest)org.osgeo.proj4j.ConvergenceFailureException:
> Iteration didn't converge
>  at
> org.osgeo.proj4j.proj.StereographicAzimuthalProjection.projectInverse(StereographicAzimuthalProjection.java:240)
> at
> org.osgeo.proj4j.proj.Projection.inverseProjectRadians(Projection.java:308)
>  at
> org.osgeo.proj4j.BasicCoordinateTransform.transform(BasicCoordinateTransform.java:119)
> at org.osgeo.proj4j.MyTest.test(MyTest.java:27)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at org.osgeo.proj4j.MyTest.main(MyTest.java:9)
>
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1
>
> What am I doing wrong?
>
> Thanks in advance for any help with this,
> Kris
>
> _______________________________________________
> Proj4j mailing list
> Proj4j at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/proj4j
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj4j/attachments/20121119/9b95cc72/attachment.html>


More information about the Proj4j mailing list