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 10:58:00 UTC
svn commit: r1691497 - 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 08:57:59 2015
New Revision: 1691497
URL: http://svn.apache.org/r1691497
Log:
Add projection identifiers and fix documentation.
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.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/LambertConformalWest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java?rev=1691497&r1=1691496&r2=1691497&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LambertConformalWest.java [UTF-8] Fri Jul 17 08:57:59 2015
@@ -52,12 +52,19 @@ public final class LambertConformalWest
public static final String IDENTIFIER = "9826";
/**
+ * The operation parameter descriptor for the <cite>False easting</cite> (FE) parameter value.
+ * In the case of West Orientated projection, despite its EPSG name this parameter is actually
+ * <cite>False westing</cite> (FW)
+ */
+ static final ParameterDescriptor<Double> FALSE_WESTING;
+
+ /**
* The group of all parameters expected by this coordinate operation.
*/
static final ParameterDescriptorGroup PARAMETERS;
static {
final ParameterBuilder builder = builder();
- final ParameterDescriptor<?> falseEasting = createShift(builder
+ FALSE_WESTING = createShift(builder
.addNamesAndIdentifiers(LambertConformal1SP.FALSE_EASTING)
.setRemarks(Messages.formatInternational(Messages.Keys.MisnamedParameter_1, "False westing")));
@@ -68,7 +75,7 @@ public final class LambertConformalWest
LambertConformal1SP.LATITUDE_OF_ORIGIN,
LambertConformal1SP.CENTRAL_MERIDIAN,
LambertConformal1SP.SCALE_FACTOR,
- falseEasting,
+ FALSE_WESTING,
LambertConformal1SP.FALSE_NORTHING);
}
Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java?rev=1691497&r1=1691496&r2=1691497&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/TransverseMercatorSouth.java [UTF-8] Fri Jul 17 08:57:59 2015
@@ -16,10 +16,13 @@
*/
package org.apache.sis.internal.referencing.provider;
+import org.opengis.parameter.ParameterDescriptor;
import org.opengis.parameter.ParameterDescriptorGroup;
+import org.apache.sis.metadata.iso.citation.Citations;
import org.apache.sis.parameter.ParameterBuilder;
import org.apache.sis.parameter.Parameters;
import org.apache.sis.referencing.operation.projection.NormalizedProjection;
+import org.apache.sis.util.resources.Messages;
/**
@@ -33,7 +36,7 @@ import org.apache.sis.referencing.operat
* @version 0.6
* @module
*
- * @see <a href="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator.html">Transverse Mercator on RemoteSensing.org</a>
+ * @see <a href="http://www.remotesensing.org/geotiff/proj_list/transverse_mercator_south_oriented.html">Transverse Mercator (South Oriented) on RemoteSensing.org</a>
*/
public final class TransverseMercatorSouth extends AbstractMercator {
/**
@@ -52,16 +55,22 @@ public final class TransverseMercatorSou
static final ParameterDescriptorGroup PARAMETERS;
static {
final ParameterBuilder builder = builder();
+ final ParameterDescriptor<Double> falseSouthing = createShift(builder
+ .addNamesAndIdentifiers(FALSE_NORTHING)
+ .setRemarks(Messages.formatInternational(Messages.Keys.MisnamedParameter_1, "False southing")));
PARAMETERS = builder
.addIdentifier(IDENTIFIER)
- .addName("Transverse Mercator (South Orientated)")
+ .addName( "Transverse Mercator (South Orientated)")
+ .addName(Citations.OGC, "Transverse_Mercator_South_Orientated")
+ .addName(Citations.GEOTIFF, "CT_TransvMercator_SouthOriented")
+ .addIdentifier(Citations.GEOTIFF, "27")
.createGroupForMapProjection(
TransverseMercator.LATITUDE_OF_ORIGIN,
TransverseMercator.LONGITUDE_OF_ORIGIN,
TransverseMercator.SCALE_FACTOR,
- FALSE_EASTING,
- FALSE_NORTHING);
+ LambertConformalWest.FALSE_WESTING,
+ falseSouthing);
}
/**
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=1691497&r1=1691496&r2=1691497&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 08:57:59 2015
@@ -145,8 +145,11 @@ public class TransverseMercator extends
ih3 = ( -37. / 840)*n4 + (17. / 480)*n3;
ih4 = (4397. / 161280)*n4;
/*
- * Computes M₀ = B⋅(ξ₁ + ξ₂ + ξ₃ + ξ₄), and negate in anticipation for what
- * will be needed in the denormalization matrix.
+ * Compute M₀ = B⋅(ξ₁ + ξ₂ + ξ₃ + ξ₄) and negate in anticipation for what will be needed
+ * in the denormalization matrix. We opportunistically use double-double arithmetic, but
+ * the precision is actually not better than double (in current SIS version) because of
+ * the precision of trigonometric functions. We may improve on that in the future if it
+ * seems useful.
*/
final double Q = asinh(tan(φ0)) - excentricity * atanh(excentricity * sin(φ0));
final double β = atan(sinh(Q));