jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • GeoTools
  • GEOT-1268

Add a MapProjection.equivalent(MapProjection) method

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor 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

Task - A task that needs to be done. GEOT-2117 Review GeoToolkit fixes

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Open - The issue is open and ready for the assignee to start work on it.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • History
  • Activity
Hide
Permalink
Martin Desruisseaux added a comment - 15/May/07 11:45 AM
Added a test skeleton in trunk as of revision 25542:

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.
Show
Martin Desruisseaux added a comment - 15/May/07 11:45 AM Added a test skeleton in trunk as of revision 25542: 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.
Hide
Permalink
Martin Desruisseaux added a comment - 04/Dec/08 8:34 AM
A UnitaryProjection.equivalent(...) method has been added in Geotidy. However it is not yet used in equalsIgnoreMetadata(...).
Show
Martin Desruisseaux added a comment - 04/Dec/08 8:34 AM A UnitaryProjection.equivalent(...) method has been added in Geotidy. However it is not yet used in equalsIgnoreMetadata(...).
Hide
Permalink
Martin Desruisseaux added a comment - 15/Mar/09 12:41 PM
AbstractMathTransform.equivalent(...) is now a public method and is used by equalsIgnoreMetadata(...). A test case as been added with the WKT provided in this JIRA task. However the axis order of the GEOGSS inside the PROJCS must be the same, so it may not be quite yet what the user expect. But as far as the AbstractMathTransform.equivalent(...) method is concerned, the work is done.

This is commited on geotidy, to be merged with geotools later.
Show
Martin Desruisseaux added a comment - 15/Mar/09 12:41 PM AbstractMathTransform.equivalent(...) is now a public method and is used by equalsIgnoreMetadata(...). A test case as been added with the WKT provided in this JIRA task. However the axis order of the GEOGSS inside the PROJCS must be the same, so it may not be quite yet what the user expect. But as far as the AbstractMathTransform.equivalent(...) method is concerned, the work is done. This is commited on geotidy, to be merged with geotools later.

People

  • Assignee:
    Unassigned
    Reporter:
    Saul Farber
Vote (1)
Watch (2)

Dates

  • Created:
    14/May/07 5:08 PM
    Updated:
    21/Dec/11 10:38 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.