<html>
<head>
<meta content="text/html; charset=ISO-8859-7"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<small>I was able to use the jar without issue after compiling with
make install (had to do a make clean first). My next question is
how do I use the tool?<br>
<br>
The command that I have been using with the proj binary is:<br>
proj +proj=healpix -f '%.'17'f' +lon_0=0 +a=1 -E<br>
0 0<br>
EOF<br>
<br>
I'm not sure what sourcePJ should be in the following example<br>
<br>
[code]<br>
</small><font size="-1"> PJ sourcePJ = new PJ("+a=1
+lon_0=0"); <br>
PJ targetPJ = new PJ("+proj=healpix");<br>
double[] coordinates = {<br>
0, 0, <br>
};<br>
sourcePJ.transform(targetPJ, 2, coordinates, 0, 1);<br>
System.out.println(Arrays.toString(coordinates)); <br>
[/code]</font> <br>
<br>
Thanks<br>
<small><br>
</small>On 23/11/11 14:57, Michael Speth wrote:
<blockquote cite="mid:4ECC52F3.60001@landcareresearch.co.nz"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-7">
<font size="-1">Anyone have experience with using the jniwrap java
wrapper?<br>
<br>
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?<br>
<br>
[code]<br>
PJ sourcePJ = new PJ("+init=epsg:32632"); //
(x,y) axis order<br>
PJ targetPJ = new PJ("+proj=latlong +datum=WGS84"); //
(ë,ö) axis order<br>
double[] coordinates = {<br>
500000, 0, // First coordinate<br>
400000, 100000, // Second coordinate<br>
600000, -100000 // Third coordinate<br>
};<br>
sourcePJ.transform(targetPJ, 2, coordinates, 0, 3);<br>
System.out.println(Arrays.toString(coordinates));<br>
<br>
[output]<br>
Exception in thread "main" java.lang.IllegalArgumentException:
+init=epsg:32632<br>
at org.proj4.PJ.<init>(Unknown Source)<br>
at
org.landcare.scenzgrid.proj4.test.HEALPixTest.main(HEALPixTest.java:36)<br>
<br>
Thanks<br>
</font>
<pre class="moz-signature" cols="72">--
Michael Speth
Research Systems Developer
Landcare Research</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Michael Speth
Research Systems Developer
Landcare Research</pre>
</body>
</html>