<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<small>I get the following error:<br>
<br>
[output]<br>
Exception in thread "main" java.lang.IllegalArgumentException:
+a=1 +lon_0=0<br>
at org.proj4.PJ.<init>(Unknown Source)<br>
at
org.landcare.scenzgrid.proj4.test.HEALPixTest.main(HEALPixTest.java:32)<br>
[/output]<br>
<br>
[code]<br>
double phi0 = Math.asin(2.0/3.0);<br>
PJ sourcePJ = new PJ("+a=1 +lon_0=0"); // (x,y) axis
order<br>
PJ targetPJ = new PJ("+proj=healpix"); // (λ,φ) axis order<br>
double[] coordinates = {<br>
0, 0, // First coordinate<br>
0, phi0, // Second coordinate<br>
0, -1*phi0 // Third coordinate<br>
};<br>
sourcePJ.transform(targetPJ, 2, coordinates, 0, 3);<br>
System.out.println(Arrays.toString(coordinates));<br>
[/code]<br>
<br>
Thanks<br>
</small><br>
<br>
<br>
On 24/11/11 10:33, Martin Desruisseaux wrote:
<blockquote cite="mid:4ECD66AF.5000907@geomatys.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Le 23/11/11 22:13, Michael Speth a écrit :
<blockquote cite="mid:4ECD61F9.2040101@landcareresearch.co.nz"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<small> The proj command that I am using I think is taking
coordinates from a unit sphere and projecting with the HEALPix
projection (I am currently working on this projection and will
provide a patch to Frank). It doesn't read data from a file.<br>
<br>
So I would like to replicate this using the jniwrap for my own
testing purposes. Can this be done?</small><br>
</blockquote>
<br>
It should, I'm not sure to understand which issue you are
facing... The code posted in your previous email should work. Do
you get an exception or unexpected result?<br>
<br>
Martin<br>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Michael Speth
Research Systems Developer
Landcare Research</pre>
</body>
</html>