Jacopo Boari a écrit :
> Using the getLatLonBoundingBox() method of the class Layer, I obtain the 
> BoundingBox in WGS 84 format, how can I convert it?

You may try the following ("CRS" is a convenience class in 
org.geotools.referencing):

CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326");
CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:23032");
MathTransform tr = CRS.findMathTransform(sourceCRS, targetCRS);

 From that point, I'm not sure which kind of object is returned by 
getLatLonBoundingBox(). But there is some convenience methods if CRS like:

CRS.transform(tr, envelope);

if the envelope is an ISO 19107 object, or other convenience methods in 
org.geotools.geometry.jts.JTS if the envelope is a JTS object.

        Martin

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to