Le lundi 19 février 2007 à 17:39 +0100, Mike Lehmann a écrit : > The last hours I read a lot of documentation about setting up CRS with > geotools. Unfortunately, it seems to require a database. We only want to > transform between two coordinate systems WGS84 (latitude, longitude) and > Gauss-Krüger (Germany, chooseable center-meridian stripe). Is it really > necessary to set up a database for this transformation?
You can process with the following steps: 1) Temporarily put "gt2-epsg-hsql.jar" in your classpath: 2) Execute the following command from the command line, where <code> is the EPSG code for your coordinate reference system: java org.geotools.referencing.factory.epsg.DefaultFactory <code> Note: on Geotools 2.4, this command will be replaced by a slightly more generic one there (not limited to EPSG codes): java org.geotools.referencing.CRS <code> 3) The above-command should print the Well Known Text (WKT) for your CRS. Copy and paste the WKT as a String constant in your code. 4) You can remove the "gt2-epsg-hsql.jar" file from your classpath. 5) In your code, use CoordinateReferenceSystem crs = CRS.parseWKT(theWktString); 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 Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users