Orhographic reprojection fails if given an elliptical datum in the CRS
----------------------------------------------------------------------

                 Key: GEOT-1554
                 URL: http://jira.codehaus.org/browse/GEOT-1554
             Project: GeoTools
          Issue Type: Bug
          Components: core referencing
    Affects Versions: 2.3.1
            Reporter: Judd Taylor
            Assignee: Martin Desruisseaux
            Priority: Minor


If the CRS for an orthographic projection is given along with a datum, then an 
assumption is made that you are wanting an elliptical orthographic projection, 
and the projection fails.

An orthographic projection is spherical by definition, so elliptical _is_ 
invalid, however, all other tools out there (proj, notably), just assume 
spherical based on the semi_major axis if an ellipsoid datum is given. Geotools 
should work the same way.

By programatically defining an ortho CRS based on the WGS84 datum, this WKT is 
produced:

PROJCS["Orthographic.WGS84.lat32.87894.lon-96.99886",
  GEOGCS["WGS84",
    DATUM["WGS84",
      SPHEROID["WGS84", 6378137.0, 298.257223563]],
    PRIMEM["Greenwich", 0.0],
    UNIT["degree", 0.017453292519943295],
    AXIS["Geodetic longitude", EAST],
    AXIS["Geodetic latitude", NORTH]],
  PROJECTION["Orthographic"],
  PARAMETER["central_meridian", -96.99886],
  PARAMETER["latitude_of_origin", 32.87894000000001],
  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]]


However, attempting to use this CRS fails, stating that it can't use an 
elliptical datum. The work around is to manually add the semi_major and 
semi_minor radius definitions:

PROJCS["Orthographic.WGS84.lat32.87894.lon-96.99886",
  GEOGCS["WGS84",
    DATUM["WGS84",
      SPHEROID["WGS84", 6378137.0, 298.257223563]],
    PRIMEM["Greenwich", 0.0],
    UNIT["degree", 0.017453292519943295],
    AXIS["Geodetic longitude", EAST],
    AXIS["Geodetic latitude", NORTH]],
  PROJECTION["Orthographic"],
  PARAMETER["semi_major", 6378137.0],
  PARAMETER["semi_minor", 6378137.0],
  PARAMETER["central_meridian", -96.99886],
  PARAMETER["latitude_of_origin", 32.87894000000001],
  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]]

But as I said before, this shouldn't be necessary, as all other software out 
there just ignores any definition of the semi_minor axis when an ellipsoid is 
given.

-Judd



-- 
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

Reply via email to