[Proj4j] XY -> LongLat proj=stere: org.osgeo.proj4j.ConvergenceFailureException
Krzysztof Czainski
1czajnik at gmail.com
Mon Nov 19 06:14:22 PST 2012
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj4j/attachments/20121119/5322cb0b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MyTest.java
Type: application/octet-stream
Size: 1259 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/proj4j/attachments/20121119/5322cb0b/attachment.obj>
More information about the Proj4j
mailing list