Hello, All JTS geometries are implicitly (because the library handles nothing else) cartesian 2D. JTS does nothing with the third coordinate but keep track of it---it could just as easily be a temperature as a height.
JTS therefore does not deal with CRS information. It does have a field to keep track of SRID but that's generally not used. In order to work with CRS's you will have to work with the geoapi interfaces and the geotools implementation. You will have to figure out what the coordinates you have actually mean and define a CRS for the coordinates (or use a pre-defined CRS in the geotools org.geotools.referencing.CRS.java class in the referencing module). So, no, you cannot go from JTS to a CRS since JTS generally doesn't keep track of that information and certainly using the CRS'es used by the rest of geotools. hope that helps, --adrian On Tue, 2007-05-22 at 14:49 +0200, Eric Lemoine wrote: > Hello gt2 users, > > Given a geometry (com.vividsolutions.jts.geom.Geometry) can I get the > associated EPSG code to ultimately get a CoordinateReferenceSystem > object? > > FYI, I'm trying to reproject geometries which I don't know the current > coordinate system. That's why I'm trying to get the current coordinate > system from the geometres themselves. > > Please tell me if I'm going the wrong way... > > Thanks, ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users