John Petritis a écrit :
> When I do a transform on a DirectPosition, the transformed
> DirectPosition is created correctly, BUT the source DirectPosition gets
> corrupted.

It should not. If the source DirectPosition is changed, it would be a Geotools 
bug (except if the source and targe DirectPosition are the same object).


> System.out.println("dp2 ordinates before             : "
> + dp2.getOrdinate(0) + "," + dp2.getOrdinate(1));
> op.getMathTransform().transform(dp2, dp1);
> System.out.println("dp2 ordinates after              : "
> + dp2.getOrdinate(0) + "," + dp2.getOrdinate(1));
> System.out.println("dp1 (the output) ordinates after : "
> + dp2.getOrdinate(0) + "," + dp2.getOrdinate(1));

The last println said that it should display "dp1", but it really display "dp2".

Also, it may be worth to add a System.out.println(dp1 != dp2) statement just to 
make sure that the two DirectPositions are really distinct objects.

        Martin

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to