Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.4-M2
-
Fix Version/s: 2.7.5
-
Component/s: referencing
-
Labels:None
Description
A MapProjection.equivalent(MapProjection) method could performs a work similar to MapProjection.equals(Object), but check only for field values relevant to transform and inverseTransform methods. The purpose is to detect MapProjection that are equivalent even in the case were parameters where specified in a different but equivalent way. It would allows CRS.equalsIgnoreMetadata(...) to returns true in some situations where it currently returns false.
Specifically, the following two WKT definitions are not equalsIgnoreMetadata, but they should be:
PROJCS["NAD_1983_StatePlane_Massachusetts_Mainland_FIPS_2001",
GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["GRS_1980", 6378137.0, 298.257222101]],
PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295],
AXIS["Longitude", EAST],
AXIS["Latitude", NORTH]],
PROJECTION["Lambert_Conformal_Conic"],
PARAMETER["central_meridian", -71.5],
PARAMETER["latitude_of_origin", 41.0],
PARAMETER["standard_parallel_1", 41.71666666666667],
PARAMETER["scale_factor", 1.0],
PARAMETER["false_easting", 200000.0],
PARAMETER["false_northing", 750000.0],
PARAMETER["standard_parallel_2", 42.68333333333334],
UNIT["m", 1.0],
AXIS["x", EAST],
AXIS["y", NORTH]]
and
PROJCS["NAD83 / Massachusetts Mainland",
GEOGCS["NAD83",
DATUM["North American Datum 1983",
SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]],
TOWGS84[1.0, 1.0, -1.0, 0.0, 0.0, 0.0, 0.0],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
UNIT["degree", 0.017453292519943295],
AXIS["Geodetic longitude", EAST],
AXIS["Geodetic latitude", NORTH],
AUTHORITY["EPSG","4269"]],
PROJECTION["Lambert Conic Conformal (2SP)", AUTHORITY["EPSG","9802"]],
PARAMETER["central_meridian", -71.5],
PARAMETER["latitude_of_origin", 41.0],
PARAMETER["standard_parallel_1", 42.68333333333334],
PARAMETER["false_easting", 200000.0],
PARAMETER["false_northing", 750000.0],
PARAMETER["standard_parallel_2", 41.71666666666667],
UNIT["m", 1.0],
AXIS["Easting", EAST],
AXIS["Northing", NORTH],
AUTHORITY["EPSG","26986"]]
Issue Links
- depends upon
-
GEOT-2117
Review GeoToolkit fixes
-
modules/plugin/epsg-hsql/src/test/java/org/geotools/referencing/factory/epsg/DefaultFactoryTest.java
method testEquivalent(). This test is not yet useful, but may be in the future when work for this issue will begin.