Shown for documentation purpose, but this code can not be ported as-is. We will need to rewrite from the Snyder's book as explained in here.
Command line:
svn diff --extensions "--unified --ignore-space-change --ignore-all-space --ignore-eol-style" -r11368:11369 https://svn.osgeo.org/geotools/trunk/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/Orthographic.java
Revision 11368 | Revision 11369 |
---|---|
throws ParameterNotFoundException
{
final Collection descriptors = PARAMETERS.descriptors();
final double latitudeOfOrigin = Math.abs(
doubleValue(Provider.LATITUDE_OF_ORIGIN, parameters));
if (isSpherical(parameters)) {
// Polar case.
if (Math.abs(latitudeOfOrigin - Math.PI/2) < EPS) {
return new OrthographicPolar(parameters, descriptors);
}
// Equatorial case. |
throws ParameterNotFoundException { final Collection descriptors = PARAMETERS.descriptors(); //values here are in degrees (the standard units for this parameter) final double latitudeOfOrigin = Math.abs( doubleValue(Provider.LATITUDE_OF_ORIGIN, parameters)); if (isSpherical(parameters)) { // Polar case. if (Math.abs(latitudeOfOrigin - 90.0) < EPS) { return new OrthographicPolar(parameters, descriptors); } // Equatorial case. |