From: anselm <ans...@gm...> - 2006-10-17 15:35:50
|
Hi all, I'm an absolute rookie with gis and geotools, so I apologize up front if this is too simple a question. I'm having trouble understanding the correct use of WKTs in order to initialize a crs. What I actually wanna do is convert coordinates I have in the wgs84 system to utm. for this purpose, I created DefaultGeographicCRS defCrs = DefaultGeographicCRS.WGS84; in a tutorial code snippet however I found this: CRSFactory crsFactory = FactoryFinder.getCRSFactory(null); String wkt = "PROJCS[\"UTM_Zone_10N\", " + "GEOGCS[\"WGS84\", " + "DATUM[\"WGS84\", " + "SPHEROID[\"WGS84\", 6378137.0, 298.257223563]], " + "PRIMEM[\"Greenwich\", 0.0], " + "UNIT[\"degree\",0.017453292519943295], " + "AXIS[\"Longitude\",EAST], " + "AXIS[\"Latitude\",NORTH]], " + "PROJECTION[\"Transverse_Mercator\"], " + "PARAMETER[\"semi_major\", 6378137.0], " + "PARAMETER[\"semi_minor\", 6356752.314245179], " + "PARAMETER[\"central_meridian\", -123.0], " + "PARAMETER[\"latitude_of_origin\", 0.0], " + "PARAMETER[\"scale_factor\", 0.9996], " + "PARAMETER[\"false_easting\", 500000.0], " + "PARAMETER[\"false_northing\", 0.0], " + "UNIT[\"metre\",1.0], " + "AXIS[\"x\",EAST], " + "AXIS[\"y\",NORTH]]"; CoordinateReferenceSystem crs = crsFactory.createFromWKT(wkt); during debug, I checked my defCrs variable and I found much less parameters set compared to the crs instance. In which way does the wgs84 system rely on these additional parameters? "UTM_Zone_10N" - what does this have to do with the wgs84 system used? From my understanding at this point, this should be part of the target crs. Appearantly there's not just one global wgs84 system then, in fact I found quite a few here: http://svn.geotools.org/geotools/trunk/gt/module/referencing/test/org/geotools/referencing/test-data/wkt/CoordinateReferenceSystem.txt how do I determine which parameters I have to set in such a wkt? Is the crs returned from using the static filed WGS84 not recommended for use then? your help is much appreciated, thank you very much! anselm -- View this message in context: http://www.nabble.com/conversion-of-ccordinates-wgs84-utm--crs-settings-tf2460358.html#a6857804 Sent from the geotools-gt2-users mailing list archive at Nabble.com. |