|
From: Jody G. <jga...@re...> - 2007-10-11 16:56:07
|
Abraham Mármol Asís wrote: > Hi all im new to geoTools and also to Geo-.... im only a simple web > programer that need to do single simple geo task > > I want to convert a coordinate expressed in EPSG:23030 to a > GoogleMaps system coordeinates I need to know some things that i cant > find by myself over internet. > > 1) What coordinate reference system use google maps? > I have read that could be this: > http://www.spatialreference.org/ref/user/google-projection/ > <http://www.spatialreference.org/ref/user/google-projection/> The mad GeoServer guys made up an EPSG code for the google projection ... I think it is "EPSG:900913". I am not sure where they put this definition however (probably in epsg extras or extention or something?). > > 2) Assuming that the GoogleMap's CRS is that ones, how can i implement > it in GeoTools. > Im triying to do something like that: > > String wkt = "String copied from here > <http://http://www.spatialreference.org/ref/user/google-projection/ogcwkt/>"; > CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:23030"); > CoordinateReferenceSystem googleCRS = CRS.parseWKT("EPSG:900913"); > MathTransform transform = CRS.findMathTransform(sourceCRS, googleCRS); > Point p2 = (Point) point.transform(targetCRS); Updated the above, cheers. Jody |