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

Krzysztof Czainski 1czajnik at gmail.com
Tue Nov 20 02:24:04 PST 2012


Thanks, I confirmed it works for me too ;-)

Kris

2012/11/20 Martin Davis <mtnclimb at gmail.com>

> This turned out to be a porting bug in the StereographicAzimuthal
> projection.  It's now fixed in SVN.
>
> Also fixed is a bug in the Robinson projection (PROJ4 #133).
>
>
> 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
>>
>>
>>
>
> _______________________________________________
> 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/20121120/5a3b9c15/attachment.html>


More information about the Proj4j mailing list