sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1676702 - in /sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing: GeodeticObjectBuilder.java crs/DefaultProjectedCRSTest.java
Date Wed, 29 Apr 2015 09:29:09 GMT
Author: desruisseaux
Date: Wed Apr 29 09:29:09 2015
New Revision: 1676702

URL: http://svn.apache.org/r1676702
Log:
Referencing: store the original parameters, in order to preserve original units of measurement.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectBuilder.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectBuilder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectBuilder.java?rev=1676702&r1=1676701&r2=1676702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectBuilder.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectBuilder.java
[UTF-8] Wed Apr 29 09:29:09 2015
@@ -28,6 +28,7 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.util.NoSuchIdentifierException;
 import org.opengis.util.FactoryException;
+import org.apache.sis.internal.referencing.OperationMethods;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.referencing.crs.DefaultProjectedCRS;
 import org.apache.sis.referencing.operation.DefaultConversion;
@@ -186,6 +187,7 @@ public class GeodeticObjectBuilder exten
              * except the aliases and identifiers. The name defaults to the ProjectedCRS
name,
              * but can optionally be different.
              */
+            properties.put(OperationMethods.PARAMETERS_KEY, parameters);
             final Object name = (conversionName != null) ? properties.put(Conversion.NAME_KEY,
conversionName) : null;
             final Object alias = properties.put(Conversion.ALIAS_KEY, null);
             final Object identifier = properties.put(Conversion.IDENTIFIERS_KEY, null);
@@ -201,6 +203,7 @@ public class GeodeticObjectBuilder exten
             return new DefaultProjectedCRS(properties, conversion, baseCRS, derivedCS);
         } finally {
             onCreate(true);
+            properties.remove(OperationMethods.PARAMETERS_KEY);
         }
     }
 }

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java?rev=1676702&r1=1676701&r2=1676702&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
[UTF-8] Wed Apr 29 09:29:09 2015
@@ -84,6 +84,7 @@ public final strictfp class DefaultProje
                 "    AXIS[“Latitude”, NORTH]],\n" +
                 "  PROJECTION[“Lambert_Conformal_Conic_1SP”, AUTHORITY[“EPSG”, “9801”]],\n"
+
                 "  PARAMETER[“latitude_of_origin”, 46.8],\n" +              // Note the
conversion from 52 grades.
+                "  PARAMETER[“central_meridian”, 0.0],\n" +
                 "  PARAMETER[“scale_factor”, 0.99987742],\n" +
                 "  PARAMETER[“false_easting”, 600000.0],\n" +
                 "  PARAMETER[“false_northing”, 2200000.0],\n" +
@@ -111,7 +112,8 @@ public final strictfp class DefaultProje
                 "      PrimeMeridian[“Paris”, 2.5969213, AngleUnit[“grade”, 0.015707963267948967]]],\n"
+
                 "  Conversion[“Lambert zone II”,\n" +
                 "    Method[“Lambert Conic Conformal (1SP)”, Id[“EPSG”, 9801, Citation[“IOGP”]]],\n"
+
-                "    Parameter[“Latitude of natural origin”, 46.8, AngleUnit[“degree”,
0.017453292519943295], Id[“EPSG”, 8801]],\n" +
+                "    Parameter[“Latitude of natural origin”, 52.0, AngleUnit[“grade”,
0.015707963267948967], Id[“EPSG”, 8801]],\n" +
+                "    Parameter[“Longitude of natural origin”, 0.0, AngleUnit[“degree”,
0.017453292519943295], Id[“EPSG”, 8802]],\n" +
                 "    Parameter[“Scale factor at natural origin”, 0.99987742, ScaleUnit[“unity”,
1], Id[“EPSG”, 8805]],\n" +
                 "    Parameter[“False easting”, 600000.0, LengthUnit[“metre”, 1],
Id[“EPSG”, 8806]],\n" +
                 "    Parameter[“False northing”, 2200000.0, LengthUnit[“metre”, 1],
Id[“EPSG”, 8807]]],\n" +



Mime
View raw message