Hello,

I've just downloaded geotools-2.1-RC1 in order to use it to convert points between to coordinate systems. I need to create wgs84 GeographicCRS but this class is deprecated. I've search in web site documentation, but it's a little bit confusing.

Here is a snippet of my code, how must i convert it in order to avois this warning.

CRSFactory fact = FactoryFinder.getCRSFactory(new Hints(
                   Hints.CRS_FACTORY, null));

CoordinateReferenceSystem crsTarget = fact.createFromWKT(wktUtm31N);

CoordinateOperationFactory coordinateOperationFactory = FactoryFinder
                   .getCoordinateOperationFactory(new Hints(
                           Hints.COORDINATE_OPERATION_FACTORY, null));

CoordinateOperation coordinateOperation = coordinateOperationFactory
                   .createOperation(GeographicCRS.WGS84, crsTarget);

DirectPosition pt = coordinateOperation.getMathTransform().transform(
                   new GeneralDirectPosition(5.11196, 50.95158),
                   new GeneralDirectPosition(0, 0));

Thanks for your help.

Regards

--
Suray Philippe
_______________________________
Market-IP
Boulevard de la Meuse, 10
B - 5100 Jambes

T: 32 81 33.11.11
F: 32 81 33.11.10




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to