[Proj] Using jniwrap

Michael Speth spethm at landcareresearch.co.nz
Wed Nov 23 14:54:35 EST 2011


Hi Martin,
I didn't do a make install, just make. So that must be the problem. I'll
try it out.

Thanks!

On 23/11/11 15:13, Martin Desruisseaux wrote:
> Hello Michael
>
> I just tried on my side and it worked well. Did you compiled with
> "make", and executed "make install" after a successful Proj.4 build? I
> believe (but I'm not sure, Frank could confirm) that "make install" is
> necessary in order to copy some necessary files like the EPSG list of
> definitions in proper locations. Maybe the exception that you get is
> caused by Proj.4 not finding the EPSG file?
>
> Martin
>
>
> Le 23/11/11 02:57, Michael Speth a écrit :
>> 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.maptools.org/pipermail/proj/attachments/20111124/1cbc9206/attachment.htm 


More information about the Proj mailing list