You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2015/07/17 17:37:43 UTC
svn commit: r1691591 - in
/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis:
internal/referencing/provider/ referencing/operation/projection/
Author: desruisseaux
Date: Fri Jul 17 15:37:42 2015
New Revision: 1691591
URL: http://svn.apache.org/r1691591
Log:
Modify the symbol used in LambertConformal for consistency with the formulas published in Synder's book and other parts of the EPSG guide.
In particular, PolarStereographic use "rho" for a variable which is playing the same role. Fix also some documentation holes.
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java?rev=1691591&r1=1691590&r2=1691591&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/PolarStereographicA.java [UTF-8] Fri Jul 17 15:37:42 2015
@@ -43,7 +43,7 @@ public final class PolarStereographicA e
* The operation parameter descriptor for the <cite>Longitude of natural origin</cite> (λ₀) parameter value.
* Valid values range is [-180 … 180]° and default value is 0°.
*/
- static final ParameterDescriptor<Double> LONGITUDE_OF_ORIGIN;
+ public static final ParameterDescriptor<Double> LONGITUDE_OF_ORIGIN;
/**
* The group of all parameters expected by this coordinate operation.
Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java?rev=1691591&r1=1691590&r2=1691591&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConformal.java [UTF-8] Fri Jul 17 15:37:42 2015
@@ -364,24 +364,24 @@ public class LambertConformal extends Ab
* the first non-linear one moved to the "normalize" affine transform, and the linear operations
* applied after the last non-linear one moved to the "denormalize" affine transform.
*/
- final double θ = srcPts[srcOff]; // θ = λ⋅n
- final double φ = srcPts[srcOff + 1]; // Sign may be reversed
+ final double θ = srcPts[srcOff ]; // θ = λ⋅n
+ final double φ = srcPts[srcOff+1]; // Sign may be reversed
final double absφ = abs(φ);
final double sinθ = sin(θ);
final double cosθ = cos(θ);
final double sinφ;
- final double r; // From EPSG guide. Note that Snyder p. 108 calls this term "ρ".
+ final double ρ; // EPSG guide uses "r", but we keep the symbol from Snyder p. 108 for consistency with PolarStereographic.
if (absφ < PI/2) {
sinφ = sin(φ);
- r = pow(expOfNorthing(φ, excentricity*sinφ), n);
+ ρ = pow(expOfNorthing(φ, excentricity*sinφ), n);
} else if (absφ < PI/2 + ANGULAR_TOLERANCE) {
sinφ = 1;
- r = (φ*n >= 0) ? POSITIVE_INFINITY : 0;
+ ρ = (φ*n >= 0) ? POSITIVE_INFINITY : 0;
} else {
- r = sinφ = NaN;
+ ρ = sinφ = NaN;
}
- final double x = r * sinθ;
- final double y = r * cosθ;
+ final double x = ρ * sinθ;
+ final double y = ρ * cosθ;
if (dstPts != null) {
dstPts[dstOff ] = x;
dstPts[dstOff + 1] = y;
@@ -394,9 +394,9 @@ public class LambertConformal extends Ab
//
final double dρ;
if (sinφ != 1) {
- dρ = n * dy_dφ(sinφ, cos(φ)) * r;
+ dρ = n * dy_dφ(sinφ, cos(φ)) * ρ;
} else {
- dρ = r;
+ dρ = ρ;
}
return new Matrix2(y, dρ*sinθ, // ∂x/∂λ , ∂x/∂φ
-x, dρ*cosθ); // ∂y/∂λ , ∂y/∂φ
@@ -480,21 +480,21 @@ public class LambertConformal extends Ab
final double absφ = abs(φ);
final double sinθ = sin(θ);
final double cosθ = cos(θ);
- final double r; // Snyder p. 108 calls this term "ρ", but we use "r" for consistency with EPSG guide.
+ final double ρ; // EPSG guide uses "r", but we keep the symbol from Snyder p. 108 for consistency with PolarStereographic.
if (absφ < PI/2) {
- r = pow(tan(PI/4 + 0.5*φ), n);
+ ρ = pow(tan(PI/4 + 0.5*φ), n);
} else if (absφ < PI/2 + ANGULAR_TOLERANCE) {
- r = (φ*n >= 0) ? POSITIVE_INFINITY : 0;
+ ρ = (φ*n >= 0) ? POSITIVE_INFINITY : 0;
} else {
- r = NaN;
+ ρ = NaN;
}
- final double x = r * sinθ;
- final double y = r * cosθ;
+ final double x = ρ * sinθ;
+ final double y = ρ * cosθ;
Matrix derivative = null;
if (derivate) {
final double dρ;
if (absφ < PI/2) {
- dρ = n*r / cos(φ);
+ dρ = n*ρ / cos(φ);
} else {
dρ = NaN;
}
Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java?rev=1691591&r1=1691590&r2=1691591&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java [UTF-8] Fri Jul 17 15:37:42 2015
@@ -105,6 +105,7 @@ public class TransverseMercator extends
*
* <ul>
* <li><cite>"Transverse Mercator"</cite>.</li>
+ * <li><cite>"Transverse Mercator (South Orientated)"</cite>.</li>
* </ul>
*
* @param method Description of the projection parameters.