Jody Garnett ha scritto:
> We have it a "fake" epsg code; cannot remember the value ...
>> Hi,
>>
>> I want to project my map for Google Maps, so Mercator1SPGoogle should
>> be the class I need.
>>
>> Currently I apply a CRS by using:
>> CoordinateReferenceSystem targetCRS = crsFactory.createFromWKT("..");
>> mapcontext.setCoordinateReferenceSystem(targetCRS);
>>
>> How do I use the Mercator1SPGoogle class for this?
Hum, the code is 900913, but the problem is not the code number,
it's the fact that Mercator1SPGoogle is in the GeoServer
code base, not in the GeoTools one.
The class is here:
https://svn.codehaus.org/geoserver/trunk/geoserver/main/src/main/java/org/geotools/referencing/operation/projection/Mercator1SPGoogle.java
and it must be accompained by this file, placed in META-INF/services
https://svn.codehaus.org/geoserver/trunk/geoserver/main/src/main/java/META-INF/services/org.geotools.referencing.operation.MathTransformProvider
Once you have those two you can use the following wkt to get the Google CRS:
PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984",
SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich",
0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST],
AXIS["Latitude", NORTH]], PROJECTION["Mercator_1SP_Google"],
PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian",
0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0],
PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST],
AXIS["y", NORTH], AUTHORITY["EPSG","900913"]]
Hope this helps
Cheers
Andrea
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users