<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<small>Thanks Martin,<br>
I didn't know the wrapper expected degrees. 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?<br>
<br>
Thanks<br>
<br>
</small>On 24/11/11 09:59, Martin Desruisseaux wrote:
<blockquote cite="mid:4ECD5EC3.3020601@geomatys.fr" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hello Michael<br>
<br>
Le 23/11/11 21:38, Michael Speth a écrit :
<blockquote cite="mid:4ECD59BF.4070703@landcareresearch.co.nz"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<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>
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>
</small></blockquote>
<br>
I'm not quite familiar with the proj command-line. If the above
was reading data from a file, in Java the developers need to read
the file themselves. The PJ Java class just wraps the PJ C/C++
data structure, which (I think) is not the place where "proj"
command-line performs file reading...<br>
<br>
<blockquote cite="mid:4ECD59BF.4070703@landcareresearch.co.nz"
type="cite"><small>I'm not sure what sourcePJ should be in the
following example<br>
<br>
</small><font size="-1"> PJ sourcePJ = new PJ("+a=1
+lon_0=0");</font><br>
</blockquote>
<br>
If the "+a=1 +lon_0=0" parameters were accepted by the "proj"
command-line, I think they will be accepted by the PJ Java class
since it just pass that parameter verbatim to the C library.<br>
<br>
The only difference between the C library and the Java wrapper is
that the Java wrappers expect angles in degrees, while the C
library expects angles in radians. The Java wrappers perform the
"radians to degrees" conversions themselves because we have more
information on the C/C++ side about whatever such conversion is
needed or not (it depends if the PJ are geographic or geocentric
or projected CRS).<br>
<br>
Javadoc is there: <a moz-do-not-send="true"
class="moz-txt-link-freetext"
href="http://www.geoapi.org/geoapi-proj4/apidocs/org/proj4/PJ.html">http://www.geoapi.org/geoapi-proj4/apidocs/org/proj4/PJ.html</a><br>
<br>
Martin<br>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Michael Speth
Research Systems Developer
Landcare Research</pre>
</body>
</html>