Author: desruisseaux
Date: Sun Nov  5 18:08:33 2017
New Revision: 1814370

URL: http://svn.apache.org/viewvc?rev=1814370&view=rev
Log:
Port bug fixes from 1.0 development branch.

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

Modified: 
sis/branches/0.8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java?rev=1814370&r1=1814369&r2=1814370&view=diff
==============================================================================
--- 
sis/branches/0.8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
 [UTF-8] (original)
+++ 
sis/branches/0.8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
 [UTF-8] Sun Nov  5 18:08:33 2017
@@ -63,6 +63,8 @@ import static org.apache.sis.internal.bo
  *   <li>Generate below {@code <h1>} elements the navigation bar with links to 
the previous and next chapters.</li>
  * </ul>
  *
+ * See package javadoc for usage example.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
  * @since   0.7
@@ -595,6 +597,7 @@ public final class Assembler {
      * Generates the {@code "content/book/en|fr/developer-guide.html"} file 
from {@code "book/en|fr/index.html"}.
      * The only argument expected by this method is the language: {@code "en"} 
or {@code "fr"}.
      * The current directory shall be the parent directory of {@code "book"} 
and {@code "content"}.
+     * See package javadoc for usage example.
      *
      * @param  args  command-line arguments. Should contain exactly on value, 
which is the language.
      * @throws Exception if an I/O error, a XML parsing error or other kinds 
of error occurred.

Modified: 
sis/branches/0.8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/package-info.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/package-info.java?rev=1814370&r1=1814369&r2=1814370&view=diff
==============================================================================
--- 
sis/branches/0.8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/package-info.java
 [UTF-8] (original)
+++ 
sis/branches/0.8/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/package-info.java
 [UTF-8] Sun Nov  5 18:08:33 2017
@@ -21,7 +21,22 @@
  * {@code http://svn.apache.org/repos/asf/sis/site/trunk/content/book/} 
directory.
  *
  * <p>The main class in this package is {@link 
org.apache.sis.internal.book.Assembler}.
- * Other classes are helper classes that should be ignored.</p>
+ * Other classes are helper classes that should be ignored. Assuming the 
following directory layout:</p>
+ *
+ * <pre>&lt;current directory&gt;
+ * ├─ trunk
+ * └─ site
+ *     ├─ book
+ *     └─ content
+ * </pre>
+ *
+ * Then the command can be used as below:
+ *
+ * <pre>cd site
+ * java -classpath ../trunk/core/sis-build-helper/target/classes 
org.apache.sis.internal.book.Assembler en
+ * </pre>
+ *
+ * Replace {@code en} by {@code fr} for generating the French version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8

Modified: 
sis/branches/0.8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java?rev=1814370&r1=1814369&r2=1814370&view=diff
==============================================================================
--- 
sis/branches/0.8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
 [UTF-8] (original)
+++ 
sis/branches/0.8/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/provider/ZonedTransverseMercator.java
 [UTF-8] Sun Nov  5 18:08:33 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/0.8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java
URL: 
http://svn.apache.org/viewvc/sis/branches/0.8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java?rev=1814370&r1=1814369&r2=1814370&view=diff
==============================================================================
--- 
sis/branches/0.8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java
 [UTF-8] (original)
+++ 
sis/branches/0.8/core/sis-referencing/src/test/java/org/apache/sis/test/integration/ConsistencyTest.java
 [UTF-8] Sun Nov  5 18:08:33 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/0.8/storage/sis-gdal/src/main/resources/native/linux/libproj-binding.so
------------------------------------------------------------------------------
    svn:executable = *


Reply via email to