[Proj] Using jniwrap
Michael Speth
spethm at landcareresearch.co.nz
Tue Nov 22 17:57:07 PST 2011
Anyone have experience with using the jniwrap java wrapper?
I've compiled the jar and set the native library path; however, I get an
error when I try to run the example from the README. Is there something
that I haven't configured correctly?
[code]
PJ sourcePJ = new PJ("+init=epsg:32632"); // (x,y)
axis order
PJ targetPJ = new PJ("+proj=latlong +datum=WGS84"); // (?,?)
axis order
double[] coordinates = {
500000, 0, // First coordinate
400000, 100000, // Second coordinate
600000, -100000 // Third coordinate
};
sourcePJ.transform(targetPJ, 2, coordinates, 0, 3);
System.out.println(Arrays.toString(coordinates));
[output]
Exception in thread "main" java.lang.IllegalArgumentException:
+init=epsg:32632
at org.proj4.PJ.<init>(Unknown Source)
at
org.landcare.scenzgrid.proj4.test.HEALPixTest.main(HEALPixTest.java:36)
Thanks
--
Michael Speth
Research Systems Developer
Landcare Research
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20111123/4eb5562b/attachment.html>
More information about the Proj
mailing list