Support Google CRS (EPSG:900913)
--------------------------------
Key: GEOT-1511
URL: http://jira.codehaus.org/browse/GEOT-1511
Project: GeoTools
Issue Type: Improvement
Components: core referencing
Affects Versions: 2.5-M0
Reporter: Martin Desruisseaux
Assignee: Martin Desruisseaux
Priority: Minor
Google projection ({{"EPSG:900913"}} is a weird spherical {{"Mercator1SP"}}
projection using sphere radius equals to the WGS 84 semi-major axis length, but
with "_sphere to ellipsoid_" conversion disabled.
http://www.spatialreference.org/ref/user/google-projection/
In other words, it is very similar to {{"EPSG:3395"}} with the flattening
factor 298.257223563 replaced by 0 (a sentinal value for infinity) in the WKT.
However we can not declare the Google projection just that way, because it has
one weird behavior: when transforming from Google projection to any other CRS,
for example WGS 84, the "_sphere to ellipsoid_" conversion should *not* be
applied. So we need a way to disable this conversion using standard (if
possible) WKT syntax. The proposed syntax is:
{code:none}
PROJCS["Google Mercator",
GEOGCS["WGS 84",
DATUM["World Geodetic System 1984",
SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic latitude", NORTH],
AXIS["Geodetic longitude", EAST],
AUTHORITY["EPSG","4326"]],
PROJECTION["Mercator (1SP)", AUTHORITY["EPSG","9804"]],
PARAMETER["semi_major", 6378137.0],
PARAMETER["semi_minor", 6378137.0],
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["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","900913"]]
{code}
This WKT is almost identical to the standard "_WGS 84 / World Mercator_" WKT,
except that the {{"semi_major"}} and {{"semi_minor"}} parameters are explicitly
defined. Usually those parameters should not be provided because they are
inferred from the {{SPHEROID}} element. If they are provided anyway, current
GeoTools implementation checks if the values are identical to the ones inferred
from the spheroid. I don't remember what is the current behavior if they differ
- throwing an exception or just logging a warning. This need to be checked.
The proposed fix is:
* Allows the values of {{PARAMETER["semi_major", ...]}} and
{{PARAMETER["semi_minor", ...]}} to differ from the values inferred from the
{{SPHEROID}} element. Maybe we should log a warning for any CRS other than the
Google one since such mismatch is usually an error - this need to be determined.
* Make sure that GeoTools uses {{PARAMETER["semi_major", ...]}} and
{{PARAMETER["semi_minor", ...]}} for map projections. I believe that this is
already the case. If GeoTools checks the consistency with {{SPHEROID}}, replace
the exception by a warning, with no warning at least in the Google case.
* Make sure that GeoTools uses {{SPHEROID}} for datum shifts. I believe that
this is already the case.
* Make sure that WKT formatting includes the {{PARAMETER["semi_major", ...]}}
and {{PARAMETER["semi_minor", ...]}} elements if they differ from the values
inferred from the {{SPHEROID}} element.
That way, GeoTools would not apply any datum shift between Google projection
and WGS 84 because the datum is already declared as WGS 84, but would still
uses the spherical equations for the projection because of the
{{PARAMETER["semi_minor", 6378137.0]}} element, which differs from what would
have been inferred from {{SPHEROID}}. No WKT extension is required. The only
thing we need to do is to make sure that GeoTools accepts a {{PARAMETER}} /
{{SPHEROID}} mismatch and use the right elements for the right operation
({{PARAMETER}} for map projection, {{SPHEROID}} for datum shift).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel