From: Martin D. <mar...@ge...> - 2006-10-24 16:40:31
|
anselm a écrit : > 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]]"; > > 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? The "defCRS" had less parameters because it is a geographic CRS, not a projected CRS. GeographicCRS use (latitude,longitude) directly; they do not involve any map projection. ProjectedCRS are more complicated; they require a map projection from a GeographicCRS to some planar surface. This map projection is defined by the various parameters you can read in the WKT above. > "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. All the above WKT is about the target CRS. "UTM_Zone_10N" is the name of this target CRS. The "WGS84" found inside the above WKT is not the source or target CRS. It is the GeographicCRS on which the ProjectedCRS is based on. A ProjectedCRS is always a projection of some GeographicRS, so this base geographic CRS need to be specified in the WKT. > 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/modules/library/referencing/src/test/resources/org/geotools/referencing/test-data/wkt/CoordinateReferenceSystem.txt (I fixed the link for the new directory layout just commited yesterday). As far as I known, WGS84 is really a datum. We often said "WGS84" for GeographicCRS that uses this WGS84 datum, but this is a shortcut. A GeographicCRS using the WGS84 datum may have (latitude,longitude) axis order, (longitude,latitude) axis order, prime meridian on Greenwich, prime meridian elsewhere, etc. > 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? The static final DefaultGeographicCRS.WGS84 constant is okay, if (longitude,latitude) axis order is what you want. An other, easier, way to get a CRS with all parameters set is to use the EPSG database: CoordinateReferenceSystem sourceCRS = CRS.decode("EPSG:4326"); CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:..."); (I don't remember the code for "UTM Zone 10N" in 'targetCRS'). The EPSG database contains de definition of 3000+ CRS with all needed parameters. Martin |