Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 2.3.1
-
Fix Version/s: 2.7.5
-
Component/s: referencing
-
Labels:None
Description
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