sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1814369 - in /sis/branches/JDK8: core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ core/sis-referencing/src/test/java/org/apache/sis/test/integration/ storage/sis-gdal/src/main/resources/native/linux/
Date Sun, 05 Nov 2017 18:07:09 GMT
Author: desruisseaux
Date: Sun Nov  5 18:07:09 2017
New Revision: 1814369

URL: http://svn.apache.org/viewvc?rev=1814369&view=rev
Log:
Fix a failure when running extensive tests.

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
    sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java
    sis/branches/JDK8/storage/sis-gdal/src/main/resources/native/linux/libproj-binding.so
  (props changed)

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java?rev=1814369&r1=1814368&r2=1814369&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
[UTF-8] Sun Nov  5 18:07:09 2017
@@ -100,6 +100,17 @@ public final class ZonedTransverseMercat
     }
 
     /**
+     * Notifies {@code DefaultMathTransformFactory} that this projection requires
+     * values for the {@code "semi_major"} and {@code "semi_minor"} parameters.
+     *
+     * @return 1, meaning that the operation requires a source ellipsoid.
+     */
+    @Override
+    public final int getEllipsoidsMask() {
+        return 1;
+    }
+
+    /**
      * Creates a map projection from the specified group of parameter values.
      *
      * @param  factory     the factory to use for creating and concatenating the (de)normalization
transforms.

Modified: sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java?rev=1814369&r1=1814368&r2=1814369&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java
[UTF-8] Sun Nov  5 18:07:09 2017
@@ -25,6 +25,7 @@ import org.opengis.util.FactoryException
 import org.opengis.util.NoSuchIdentifierException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.apache.sis.referencing.factory.FactoryDataException;
+import org.apache.sis.referencing.factory.UnavailableFactoryException;
 import org.apache.sis.referencing.IdentifiedObjects;
 import org.apache.sis.referencing.CRS;
 import org.apache.sis.io.wkt.Convention;
@@ -67,11 +68,22 @@ public final strictfp class ConsistencyT
      * Codes to exclude for now.
      */
     private static final Set<String> EXCLUDES = new HashSet<>(Arrays.asList(
-        "CRS:1",            // Computer display
-        "EPSG:5819"         // EPSG topocentric example A
+        "CRS:1",            // Computer display: WKT parser alters the (i,j) axis names.
+        "EPSG:5819",        // EPSG topocentric example A: error while parsing WKT.
+        "AUTO2:42001",      // This projection requires parameters, but we provide none.
+        "AUTO2:42002",      // This projection requires parameters, but we provide none.
+        "AUTO2:42003",      // This projection requires parameters, but we provide none.
+        "AUTO2:42004",      // This projection requires parameters, but we provide none.
+        "AUTO2:42005"       // This projection requires parameters, but we provide none.
     ));
 
     /**
+     * Width of the code columns in the warnings formatted by {@link #print(String, String,
Object)}.
+     * We begin with an arbitrary width and will expand if necessary.
+     */
+    private int codeWidth = 15;
+
+    /**
      * Verifies the WKT consistency of all CRS instances.
      *
      * @throws FactoryException if an error other than "unsupported operation method" occurred.
@@ -92,7 +104,7 @@ public final strictfp class ConsistencyT
                 final CoordinateReferenceSystem crs;
                 try {
                     crs = CRS.forCode(code);
-                } catch (NoSuchIdentifierException | FactoryDataException e) {
+                } catch (UnavailableFactoryException | NoSuchIdentifierException | FactoryDataException
e) {
                     print(code, "WARNING", e.getLocalizedMessage());
                     continue;
                 }
@@ -118,9 +130,13 @@ public final strictfp class ConsistencyT
      * Prints the given code followed by spaces and the given {@code "ERROR"} or {@code "WARNING"}
word,
      * then the given message.
      */
-    private static void print(final String code, final String word, final Object message)
{
+    private void print(final String code, final String word, final Object message) {
+        final int currentWidth = code.length();
+        if (currentWidth >= codeWidth) {
+            codeWidth = currentWidth + 1;
+        }
         out.print(code);
-        out.print(CharSequences.spaces(15 - code.length()));
+        out.print(CharSequences.spaces(codeWidth - currentWidth));
         out.print(word);
         out.print(": ");
         out.println(message);
@@ -135,7 +151,7 @@ public final strictfp class ConsistencyT
      * @param  crs   the CRS to test.
      * @return the parsed CRS.
      */
-    private static CoordinateReferenceSystem parseAndFormat(final WKTFormat f,
+    private CoordinateReferenceSystem parseAndFormat(final WKTFormat f,
             final String code, final CoordinateReferenceSystem crs)
     {
         String wkt = f.format(crs);

Propchange: sis/branches/JDK8/storage/sis-gdal/src/main/resources/native/linux/libproj-binding.so
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message