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/11/13 00:23:54 UTC

svn commit: r1714140 - in /sis/branches/JDK7: ./ core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ core/sis-referencing/src/main/resources/META-INF/services/ core/sis-referencing/src/test/java/org/apache/sis/internal/refe...

Author: desruisseaux
Date: Thu Nov 12 23:23:53 2015
New Revision: 1714140

URL: http://svn.apache.org/viewvc?rev=1714140&view=rev
Log:
Merge from the JDK8 branch.

Added:
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java
      - copied unchanged from r1714138, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets3D.java
      - copied unchanged from r1714138, sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/GeographicOffsets3D.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/GeographicOffsetsTest.java
      - copied unchanged from r1714138, sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/GeographicOffsetsTest.java
Modified:
    sis/branches/JDK7/   (props changed)
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java
    sis/branches/JDK7/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/AllProvidersTest.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2DTest.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/LongitudeRotationTest.java
    sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
    sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java

Propchange: sis/branches/JDK7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Nov 12 23:23:53 2015
@@ -1,4 +1,4 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394913-1508480
-/sis/branches/JDK8:1584960-1714051
+/sis/branches/JDK8:1584960-1714138
 /sis/trunk:1394364-1508466,1519089-1519674

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java?rev=1714140&r1=1714139&r2=1714140&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/LongitudeRotation.java [UTF-8] Thu Nov 12 23:23:53 2015
@@ -18,14 +18,12 @@ package org.apache.sis.internal.referenc
 
 import javax.xml.bind.annotation.XmlTransient;
 import org.opengis.parameter.ParameterValueGroup;
-import org.opengis.parameter.ParameterDescriptor;
 import org.opengis.parameter.ParameterDescriptorGroup;
 import org.opengis.parameter.ParameterNotFoundException;
 import org.opengis.referencing.operation.Transformation;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.apache.sis.internal.referencing.j2d.AffineTransform2D;
-import org.apache.sis.parameter.ParameterBuilder;
 import org.apache.sis.parameter.Parameters;
 
 
@@ -58,18 +56,11 @@ public final class LongitudeRotation ext
     private static final long serialVersionUID = -2104496465933824935L;
 
     /**
-     * The operation parameter descriptor for the <cite>"longitude offset"</cite> parameter value.
-     */
-    private static final ParameterDescriptor<Double> OFFSET;
-
-    /**
      * The group of all parameters expected by this coordinate operation.
      */
     private static final ParameterDescriptorGroup PARAMETERS;
     static {
-        final ParameterBuilder builder = builder();
-        OFFSET = createLongitude(builder.addIdentifier("8602").addName("Longitude offset"));
-        PARAMETERS = builder.addIdentifier("9601").addName("Longitude rotation").createGroup(OFFSET);
+        PARAMETERS = builder().addIdentifier("9601").addName("Longitude rotation").createGroup(GeographicOffsets.TX);
     }
 
     /**
@@ -109,7 +100,7 @@ public final class LongitudeRotation ext
     public MathTransform createMathTransform(final MathTransformFactory factory, final ParameterValueGroup values)
             throws ParameterNotFoundException
     {
-        final double offset = Parameters.castOrWrap(values).doubleValue(OFFSET);
+        final double offset = Parameters.castOrWrap(values).doubleValue(GeographicOffsets.TX);
         return new AffineTransform2D(1, 0, 0, 1, offset, 0);
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod?rev=1714140&r1=1714139&r2=1714140&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod [UTF-8] Thu Nov 12 23:23:53 2015
@@ -2,6 +2,8 @@
 # Heavier classes (e.g. having more dependencies) or classes less likely to be used, should be last.
 org.apache.sis.internal.referencing.provider.Affine
 org.apache.sis.internal.referencing.provider.Geographic3Dto2D
+org.apache.sis.internal.referencing.provider.GeographicOffsets
+org.apache.sis.internal.referencing.provider.GeographicOffsets3D
 org.apache.sis.internal.referencing.provider.LongitudeRotation
 org.apache.sis.internal.referencing.provider.GeocentricTranslation
 org.apache.sis.internal.referencing.provider.PositionVector7Param

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/AllProvidersTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/AllProvidersTest.java?rev=1714140&r1=1714139&r2=1714140&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/AllProvidersTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/AllProvidersTest.java [UTF-8] Thu Nov 12 23:23:53 2015
@@ -52,6 +52,8 @@ public final strictfp class AllProviders
     private static Class<?>[] methods() {
         return new Class<?>[] {
             Affine.class,
+            GeographicOffsets.class,
+            GeographicOffsets3D.class,
             LongitudeRotation.class,
             CoordinateFrameRotation.class,
             CoordinateFrameRotation2D.class,

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2DTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2DTest.java?rev=1714140&r1=1714139&r2=1714140&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2DTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/Geographic3Dto2DTest.java [UTF-8] Thu Nov 12 23:23:53 2015
@@ -17,7 +17,6 @@
 package org.apache.sis.internal.referencing.provider;
 
 import org.opengis.util.FactoryException;
-import org.opengis.parameter.ParameterValueGroup;
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.MathTransformFactory;
 import org.opengis.referencing.operation.NoninvertibleTransformException;
@@ -42,7 +41,7 @@ import static org.opengis.test.Assert.*;
 @DependsOn(AffineTest.class)
 public final strictfp class Geographic3Dto2DTest extends TestCase {
     /**
-     * Tests {@link Geographic3Dto2D#createMathTransform(ParameterValueGroup)}.
+     * Tests {@code Geographic3Dto2D.createMathTransform(…)}.
      *
      * @throws FactoryException should never happen.
      * @throws NoninvertibleTransformException should never happen.

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/LongitudeRotationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/LongitudeRotationTest.java?rev=1714140&r1=1714139&r2=1714140&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/LongitudeRotationTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/LongitudeRotationTest.java [UTF-8] Thu Nov 12 23:23:53 2015
@@ -40,7 +40,7 @@ import static org.apache.sis.test.Metada
 @DependsOn(AffineTest.class)
 public final strictfp class LongitudeRotationTest extends TestCase {
     /**
-     * Tests {@link LongitudeRotation#createMathTransform(ParameterValueGroup)}.
+     * Tests {@code LongitudeRotation.createMathTransform(…)}.
      */
     @Test
     public void testCreateMathTransform() {

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java?rev=1714140&r1=1714139&r2=1714140&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java [UTF-8] Thu Nov 12 23:23:53 2015
@@ -125,6 +125,7 @@ import org.junit.BeforeClass;
 
     // Registration of map projections and other math transforms.
     org.apache.sis.internal.referencing.provider.AffineTest.class,
+    org.apache.sis.internal.referencing.provider.GeographicOffsetsTest.class,
     org.apache.sis.internal.referencing.provider.Geographic3Dto2DTest.class,
     org.apache.sis.internal.referencing.provider.LongitudeRotationTest.class,
     org.apache.sis.internal.referencing.provider.GeocentricTranslationTest.class,

Modified: sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java?rev=1714140&r1=1714139&r2=1714140&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-shapefile/src/main/java/org/apache/sis/internal/shapefile/ShapefileDescriptor.java [UTF-8] Thu Nov 12 23:23:53 2015
@@ -95,6 +95,86 @@ public class ShapefileDescriptor {
     }
 
     /**
+     * Returns the version of the shapefile.
+     * @return Version.
+     */
+    public int getVersion() {
+        return this.version;
+    }
+
+    /**
+     * Returns the ESRI shape type in the shapefile.
+     * @return Shape type.
+     */
+    public ShapeTypeEnum getShapeType() {
+        return this.shapeType;
+    }
+
+    /**
+     * Returns the X Min property.
+     * @return XMin.
+     */
+    public double getXmin() {
+        return this.xmin;
+    }
+
+    /**
+     * Returns the Y Min property.
+     * @return YMin.
+     */
+    public double getYmin() {
+        return this.ymin;
+    }
+
+    /**
+     * Returns the X Max property.
+     * @return XMax.
+     */
+    public double getXmax() {
+        return this.xmax;
+    }
+
+    /**
+     * Returns the Y Max property.
+     * @return YMax.
+     */
+    public double getYmax() {
+        return this.ymax;
+    }
+
+    /**
+     * Returns the Z Min property.
+     * @return ZMin.
+     */
+    public double getZmin() {
+        return this.zmin;
+    }
+
+    /**
+     * Returns the Z Max property.
+     * @return ZMax.
+     */
+    public double getZmax() {
+        return this.zmax;
+    }
+
+    /**
+     * Returns the M Min property. 
+     * @return M min.
+     */
+    public double getMmin() {
+        return this.mmin;
+    }
+    
+    /**
+     * Returns the M Max property.
+     * @return M Max.
+     */
+    public double getMmax(){
+        return this.mmax;
+    }
+
+    /**
      * @see java.lang.Object#toString()
      */
     @Override