|
From: Martin D. <mar...@ge...> - 2007-10-14 15:55:52
|
Abraham Mármol Asís a écrit : > I only need to convert a point expressed in EPGS:20030 (what is a > mercator projection) and then obtain its equivalent Longitutude and > latitude (that suites the google system) to invoque the google map > method: map.setCenter (new GLatLng(myLat,myLong), myZom); > > The problem is how to obtain that long,lat corresponding to EPSG > Projection... A possible approach is to transform from EPSG:20030 to EPSG:4326 (which is latitude,longitude on WGS 84 ellipsoid). Be aware that (latitude,longitude) are not unique. For example (40°N, 10°E) do not design a single location. It may be many different locations, depending of the underlying CRS. (40°N, 10°E) in WGS 84 may be one km apart from (40°N, 10°E) in an other geographic CRS! So the choice of the target GeographicCRS really matter. I believe (not sure - Andrea could confirm) that the Google CRS has been added in the Geoserver code base, not in the Geotools code base. In the main time, WGS 84 (EPSG:4326) is probably the closest CRS available in GeoTools. Martin |