sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1773010 [4/8] - in /sis/branches/JDK7: ./ application/sis-console/src/main/artifact/ application/sis-openoffice/src/main/unopkg/ core/sis-build-helper/src/main/javadoc/ core/sis-feature/src/main/java/org/apache/sis/feature/ core/sis-featur...
Date Wed, 07 Dec 2016 04:14:47 GMT
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -66,6 +66,7 @@ import org.opengis.referencing.datum.*;
 import org.opengis.referencing.operation.*;
 import org.opengis.referencing.IdentifiedObject;
 import org.opengis.referencing.NoSuchAuthorityCodeException;
+
 import org.apache.sis.internal.metadata.ReferencingServices;
 import org.apache.sis.internal.metadata.TransformationAccuracy;
 import org.apache.sis.internal.metadata.WKTKeywords;
@@ -2513,7 +2514,12 @@ next:               while (r.next()) {
                 /*
                  * Determines if the inverse operation can be performed by reversing the parameter sign.
                  * The EPSG dataset uses "Yes" or "No" value, but SIS scripts use boolean type. We have
-                 * to accept both.
+                 * to accept both. Note that if we do not recognize the string as a boolean value, then
+                 * we need a SQLException, not a null value.  If the value is wrongly null, this method
+                 * will succeed anyway and EPSGDataAccess will finish its work without apparent problem,
+                 * but Apache SIS will fail later when it will try to compute the inverse operation, for
+                 * example in a call to CRS.findOperation(…). The exception thrown at such later time is
+                 * much more difficult to relate to the root cause than if we throw the exception here.
                  */
                 InternationalString isReversible = null;
                 try (ResultSet r = executeQuery("ParameterSign",
@@ -2526,7 +2532,7 @@ next:               while (r.next()) {
                             b = r.getBoolean(1);
                             if (r.wasNull()) b = null;
                         } else {
-                            b = SQLUtilities.toBoolean(r.getString(1));
+                            b = SQLUtilities.toBoolean(r.getString(1));     // May throw SQLException - see above comment.
                         }
                         if (b != null) {
                             isReversible = b ? SignReversalComment.OPPOSITE : SignReversalComment.SAME;
@@ -3058,7 +3064,8 @@ next:               while (r.next()) {
         }
 
         /**
-         * Searches for the given object with warnings for deprecations temporarily disabled.
+         * Lookups objects which are approximatively equal to the specified object.
+         * This method temporarily disables warnings about deprecated objects.
          */
         @Override
         public Set<IdentifiedObject> find(final IdentifiedObject object) throws FactoryException {

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGInstaller.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -25,15 +25,12 @@ import java.util.StringTokenizer;
 import java.util.concurrent.TimeUnit;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 import java.io.BufferedReader;
 import org.apache.sis.util.StringBuilders;
 import org.apache.sis.internal.metadata.sql.ScriptRunner;
 import org.apache.sis.internal.metadata.sql.SQLUtilities;
 import org.apache.sis.internal.system.DefaultFactories;
 import org.apache.sis.internal.util.Fallback;
-import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.resources.Messages;
 import org.apache.sis.util.logging.PerformanceLevel;
@@ -64,9 +61,11 @@ final class EPSGInstaller extends Script
      *     UPDATE epsg_datum
      *     SET datum_name = replace(datum_name, CHAR(182), CHAR(10));
      * }
+     *
+     * Note: this regular expression use a capturing group.
      */
     static final String REPLACE_STATEMENT =
-            "\\s*UPDATE\\s+[\\w\\.\" ]+\\s+SET\\s+(\\w+)\\s*=\\s*replace\\s*\\(\\s*\\1\\W+.*";
+            "UPDATE\\s+[\\w\\.\" ]+\\s+SET\\s+(\\w+)\\s*=\\s*replace\\s*\\(\\s*\\1\\W+.*";
 
     /**
      * {@code true} if the Pilcrow character (¶ - decimal code 182) should be replaced by Line Feed
@@ -76,12 +75,6 @@ final class EPSGInstaller extends Script
     private final boolean replacePilcrow;
 
     /**
-     * Non-null if there is SQL statements to skip. This is the case of {@code UPDATE … SET x = REPLACE(x, …)}
-     * functions, since Derby does not supports the {@code REPLACE} function.
-     */
-    private final Matcher statementToSkip;
-
-    /**
      * Creates a new runner which will execute the statements using the given connection.
      * The encoding is {@code "ISO-8859-1"}, which is the encoding used for the files provided by EPSG.
      *
@@ -100,11 +93,15 @@ final class EPSGInstaller extends Script
                 break;
             }
         }
-        if (isReplaceSupported) {
-            statementToSkip = null;
-        } else {
-            statementToSkip = Pattern.compile(REPLACE_STATEMENT, Pattern.CASE_INSENSITIVE).matcher("");
+        if (!isReplaceSupported) {
+            addStatementToSkip(REPLACE_STATEMENT);
         }
+        /*
+         * The SQL scripts provided by EPSG contains some lines with only a "COMMIT" statement.
+         * This statement is not understood by all databases, and interferes with our calls to
+         * setAutoCommit(false) ... commit() / rollback().
+         */
+        addStatementToSkip("COMMIT");
         replacePilcrow = false;         // Never supported for now.
     }
 
@@ -124,9 +121,10 @@ final class EPSGInstaller extends Script
              * Creates the schema on the database. We do that before to setup the 'toSchema' map, while the map still null.
              * Note that we do not quote the schema name, which is a somewhat arbitrary choice.
              */
-            execute(new StringBuilder("CREATE SCHEMA ").append(schema));
+            execute(new StringBuilder("CREATE SCHEMA ").append(identifierQuote).append(schema).append(identifierQuote));
             if (isGrantOnSchemaSupported) {
-                execute(new StringBuilder("GRANT USAGE ON SCHEMA ").append(schema).append(" TO ").append(PUBLIC));
+                execute(new StringBuilder("GRANT USAGE ON SCHEMA ")
+                        .append(identifierQuote).append(schema).append(identifierQuote).append(" TO ").append(PUBLIC));
             }
             /*
              * Mapping from the table names used in the SQL scripts to the original names used in the MS-Access database.
@@ -175,8 +173,16 @@ final class EPSGInstaller extends Script
     final void prependNamespace(final String schema) {
         modifyReplacements(new BiFunction<String,String,String>() {
             @Override public String apply(String key, String value) {
-                return key.startsWith(SQLTranslator.TABLE_PREFIX) ?
-                        schema + '.' + identifierQuote + value + identifierQuote : value;
+                if (key.startsWith(SQLTranslator.TABLE_PREFIX)) {
+                    final StringBuilder buffer = new StringBuilder(value.length() + schema.length() + 5);
+                    buffer.append(identifierQuote).append(schema).append(identifierQuote).append('.');
+                    final boolean isQuoted = value.endsWith(identifierQuote);
+                    if (!isQuoted) buffer.append(identifierQuote);
+                    buffer.append(value);
+                    if (!isQuoted) buffer.append(identifierQuote);
+                    value = buffer.toString();
+                }
+                return value;
             }
         });
     }
@@ -217,26 +223,6 @@ final class EPSGInstaller extends Script
      */
     @Override
     protected int execute(final StringBuilder sql) throws SQLException, IOException {
-        /*
-         * The SQL scripts provided by EPSG contains some lines with only a "COMMIT" statement.
-         * This statement is not understood by all databases, and interferes with our calls to
-         * setAutoCommit(false) ... commit() / rollback().
-         */
-        if (CharSequences.equalsIgnoreCase(sql, "COMMIT")) {
-            return 0;
-        }
-        if (!isGrantOnTableSupported && CharSequences.regionMatches(sql, 0, "GRANT")) {
-            return 0;
-        }
-        if (!isEnumTypeSupported && CharSequences.regionMatches(sql, 0, "CREATE")) {
-            final String t = CharSequences.trimWhitespaces(sql, 6, 12).toString();
-            if (t.equals("TYPE") || t.equals("CAST")) {
-                return 0;
-            }
-        }
-        if (statementToSkip != null && statementToSkip.reset(sql).matches()) {
-            return 0;
-        }
         if (replacePilcrow) {
             StringBuilders.replace(sql, "¶", "\n");
         }

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/InstallationScriptProvider.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -224,6 +224,7 @@ public abstract class InstallationScript
         } else {
             in = openStream(name);
             charset = StandardCharsets.ISO_8859_1;
+            name = name.concat(".sql");
         }
         if (in == null) {
             throw new FileNotFoundException(Errors.format(Errors.Keys.FileNotFound_1, name));

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -776,7 +776,7 @@ check:      for (int isTarget=0; ; isTar
                      deepEquals(getInterpolationCRS(),            getInterpolationCRS(that), mode))
                 {
                     /*
-                     * At this point all metdata match or can be ignored. First, compare the targetCRS.
+                     * At this point all metadata match or can be ignored. First, compare the targetCRS.
                      * We need to perform this comparison only if this 'equals(…)' method is not invoked
                      * from AbstractDerivedCRS, otherwise we would fall in an infinite recursive loop
                      * (because targetCRS is the DerivedCRS, which in turn wants to compare this operation).
@@ -786,7 +786,7 @@ check:      for (int isTarget=0; ; isTar
                      * its "from base" conversion. The flag should never be set in any other circumstance,
                      * since this is an internal Apache SIS mechanism. If we know that we are comparing the
                      * AbstractDerivedCRS.fromBase conversion, then (in the way Apache SIS is implemented)
-                     * this.sourceCRS == AbstractDerivedCRS.baseCRS. Consequently we can relax the check
+                     * this.sourceCRS == AbstractDerivedCRS.baseCRS. Consequently we can relax the check of
                      * sourceCRS axis order if the mode is ComparisonMode.IGNORE_METADATA.
                      */
                     if (Semaphores.queryAndSet(Semaphores.CONVERSION_AND_CRS)) {

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/AbstractSingleOperation.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -112,7 +112,9 @@ class AbstractSingleOperation extends Ab
 
     /**
      * Creates a coordinate operation from the given properties.
+     * This constructor would be public if {@code AbstractSingleOperation} was public.
      */
+    @SuppressWarnings("PublicConstructorInNonPublicClass")
     public AbstractSingleOperation(final Map<String,?>             properties,
                                    final CoordinateReferenceSystem sourceCRS,
                                    final CoordinateReferenceSystem targetCRS,
@@ -364,8 +366,8 @@ class AbstractSingleOperation extends Ab
         /*
          * We consider the operation method as metadata. One could argue that OperationMethod's 'sourceDimension' and
          * 'targetDimension' are not metadata, but their values should be identical to the 'sourceCRS' and 'targetCRS'
-         * dimensions, already checked below. We could also argue that 'OperationMethod.parameters' are not metadata,
-         * but their values should have been taken in account for the MathTransform creation, compared below.
+         * dimensions, already checked above. We could also argue that 'OperationMethod.parameters' are not metadata,
+         * but their values should have been taken in account for the MathTransform creation, compared above.
          *
          * Comparing the MathTransforms instead of parameters avoid the problem of implicit parameters. For example in
          * a ProjectedCRS, the "semiMajor" and "semiMinor" axis lengths are sometime provided as explicit parameters,

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationFinder.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -941,7 +941,7 @@ public class CoordinateOperationFinder e
         if (main instanceof SingleOperation) {
             final SingleOperation op = (SingleOperation) main;
             final MathTransform mt = factorySIS.getMathTransformFactory().createConcatenatedTransform(mt1, mt2);
-            main = createFromMathTransform(new HashMap<>(IdentifiedObjects.getProperties(main)),
+            main = createFromMathTransform(new HashMap<String,Object>(IdentifiedObjects.getProperties(main)),
                    sourceCRS, targetCRS, mt, op.getMethod(), op.getParameterValues(),
                    (main instanceof Transformation) ? Transformation.class :
                    (main instanceof Conversion) ? Conversion.class : SingleOperation.class);
@@ -961,7 +961,7 @@ public class CoordinateOperationFinder e
                     break;
                 }
             }
-            main = createFromMathTransform(new HashMap<>(IdentifiedObjects.getProperties(main)),
+            main = createFromMathTransform(new HashMap<String,Object>(IdentifiedObjects.getProperties(main)),
                     main.getSourceCRS(), main.getTargetCRS(), main.getMathTransform(), null, null, type);
         }
         return main;

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -706,7 +706,7 @@ class CoordinateOperationRegistry {
         CoordinateReferenceSystem crs;
         if (Utilities.equalsApproximatively(sourceCRS, crs = operation.getSourceCRS())) sourceCRS = crs;
         if (Utilities.equalsApproximatively(targetCRS, crs = operation.getTargetCRS())) targetCRS = crs;
-        final Map<String,Object> properties = new HashMap<>(derivedFrom(operation));
+        final Map<String,Object> properties = new HashMap<String,Object>(derivedFrom(operation));
         /*
          * Determine whether the operation to create is a Conversion or a Transformation
          * (could also be a Conversion subtype like Projection, but this is less important).

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConcatenatedOperation.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -100,11 +100,12 @@ final class DefaultConcatenatedOperation
      *   </tr>
      * </table>
      *
-     * @param  properties The properties to be given to the identified object.
-     * @param  operations The sequence of operations. Shall contains at least two operations.
-     * @param  mtFactory  The math transform factory to use for math transforms concatenation.
+     * @param  properties  the properties to be given to the identified object.
+     * @param  operations  the sequence of operations. Shall contains at least two operations.
+     * @param  mtFactory   the math transform factory to use for math transforms concatenation.
      * @throws FactoryException if the factory can not concatenate the math transforms.
      */
+    @SuppressWarnings("PublicConstructorInNonPublicClass")
     public DefaultConcatenatedOperation(final Map<String,?> properties, CoordinateOperation[] operations,
             final MathTransformFactory mtFactory) throws FactoryException
     {
@@ -155,10 +156,10 @@ final class DefaultConcatenatedOperation
      * since we are adding accuracy informations to a concatenated operation. This departure should be considered
      * as a convenience feature only; accuracies are really relevant in transformations only.</div>
      *
-     * @param  properties  The properties specified at construction time, or {@code null} if unknown.
-     * @param  operations  The operations to concatenate.
-     * @param  flattened   The destination list in which to add the {@code SingleOperation} instances.
-     * @param  mtFactory   The math transform factory to use, or {@code null} for not performing concatenation.
+     * @param  properties  the properties specified at construction time, or {@code null} if unknown.
+     * @param  operations  the operations to concatenate.
+     * @param  flattened   the destination list in which to add the {@code SingleOperation} instances.
+     * @param  mtFactory   the math transform factory to use, or {@code null} for not performing concatenation.
      * @param  setAccuracy {@code true} for setting the {@link #coordinateOperationAccuracy} field.
      * @param  setDomain   {@code true} for setting the {@link #domainOfValidity} field.
      * @throws FactoryException if the factory can not concatenate the math transforms.
@@ -254,7 +255,7 @@ final class DefaultConcatenatedOperation
      *
      * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
      *
-     * @param operation The coordinate operation to copy.
+     * @param  operation  the coordinate operation to copy.
      *
      * @see #castOrCopy(ConcatenatedOperation)
      */
@@ -271,8 +272,8 @@ final class DefaultConcatenatedOperation
      * Note that this is a <cite>shallow</cite> copy operation, since the other properties contained in the given
      * object are not recursively copied.
      *
-     * @param  object The object to get as a SIS implementation, or {@code null} if none.
-     * @return A SIS implementation containing the values of the given object (may be the
+     * @param  object  the object to get as a SIS implementation, or {@code null} if none.
+     * @return a SIS implementation containing the values of the given object (may be the
      *         given object itself), or {@code null} if the argument was null.
      */
     public static DefaultConcatenatedOperation castOrCopy(final ConcatenatedOperation object) {
@@ -299,7 +300,7 @@ final class DefaultConcatenatedOperation
     /**
      * Returns the sequence of operations.
      *
-     * @return The sequence of operations.
+     * @return the sequence of operations.
      */
     @Override
     @SuppressWarnings("ReturnOfCollectionOrArrayField")
@@ -318,7 +319,7 @@ final class DefaultConcatenatedOperation
     @Override
     public boolean equals(final Object object, final ComparisonMode mode) {
         if (object == this) {
-            return true; // Slight optimization.
+            return true;                            // Slight optimization.
         }
         if (super.equals(object, mode)) {
             if (mode == ComparisonMode.STRICT) {
@@ -344,7 +345,7 @@ final class DefaultConcatenatedOperation
      * Formats this coordinate operation in pseudo-WKT. This is specific to Apache SIS since
      * there is no concatenated operation in the Well Known Text (WKT) version 2 format.
      *
-     * @param  formatter The formatter to use.
+     * @param  formatter  the formatter to use.
      * @return {@code "ConcatenatedOperation"}.
      */
     @Override

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultConversion.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -144,13 +144,13 @@ public class DefaultConversion extends A
      * with different source and target datum, it does not accept to use such instances for
      * {@linkplain org.apache.sis.referencing.crs.DefaultDerivedCRS derived CRS} construction.
      *
-     * @param properties The properties to be given to the identified object.
-     * @param sourceCRS  The source CRS.
-     * @param targetCRS  The target CRS, which shall use a datum
-     *                   {@linkplain Utilities#equalsIgnoreMetadata equals (ignoring metadata)} to the source CRS datum.
-     * @param interpolationCRS The CRS of additional coordinates needed for the operation, or {@code null} if none.
-     * @param method     The coordinate operation method (mandatory in all cases).
-     * @param transform  Transform from positions in the source CRS to positions in the target CRS.
+     * @param properties  the properties to be given to the identified object.
+     * @param sourceCRS   the source CRS.
+     * @param targetCRS   the target CRS, which shall use a datum
+     *                    {@linkplain Utilities#equalsIgnoreMetadata equals (ignoring metadata)} to the source CRS datum.
+     * @param interpolationCRS  the CRS of additional coordinates needed for the operation, or {@code null} if none.
+     * @param method      the coordinate operation method (mandatory in all cases).
+     * @param transform   transform from positions in the source CRS to positions in the target CRS.
      */
     public DefaultConversion(final Map<String,?>             properties,
                              final CoordinateReferenceSystem sourceCRS,
@@ -193,10 +193,10 @@ public class DefaultConversion extends A
      * the parameters used for creating the transform. Those parameters will be stored for information purpose and can
      * be given back by the {@link #getParameterValues()} method.</p>
      *
-     * @param properties The properties to be given to the identified object.
-     * @param method     The operation method.
-     * @param transform  Transform from positions in the source CRS to positions in the target CRS, or {@code null}.
-     * @param parameters The {@code transform} parameter values, or {@code null}.
+     * @param properties  the properties to be given to the identified object.
+     * @param method      the operation method.
+     * @param transform   transform from positions in the source CRS to positions in the target CRS, or {@code null}.
+     * @param parameters  the {@code transform} parameter values, or {@code null}.
      *
      * @see DefaultMathTransformFactory#swapAndScaleAxes(MathTransform, DefaultMathTransformFactory.Context)
      */
@@ -224,11 +224,11 @@ public class DefaultConversion extends A
      * specified source and target CRS. While the source conversion can be an arbitrary one, it is
      * typically a defining conversion.
      *
-     * @param definition The defining conversion.
-     * @param source     The new source CRS.
-     * @param target     The new target CRS.
-     * @param factory    The factory to use for creating a transform from the parameters or for performing axis changes.
-     * @param actual     An array of length 1 where to store the actual operation method used by the math transform factory.
+     * @param definition  the defining conversion.
+     * @param source      the new source CRS.
+     * @param target      the new target CRS.
+     * @param factory     the factory to use for creating a transform from the parameters or for performing axis changes.
+     * @param actual      an array of length 1 where to store the actual operation method used by the math transform factory.
      */
     DefaultConversion(final Conversion definition,
                       final CoordinateReferenceSystem source,
@@ -311,7 +311,7 @@ public class DefaultConversion extends A
      *
      * <p>This constructor performs a shallow copy, i.e. the properties are not cloned.</p>
      *
-     * @param operation The coordinate operation to copy.
+     * @param  operation  the coordinate operation to copy.
      *
      * @see #castOrCopy(Conversion)
      */
@@ -342,8 +342,8 @@ public class DefaultConversion extends A
      *       properties contained in the given object are not recursively copied.</li>
      * </ul>
      *
-     * @param  object The object to get as a SIS implementation, or {@code null} if none.
-     * @return A SIS implementation containing the values of the given object (may be the
+     * @param  object  the object to get as a SIS implementation, or {@code null} if none.
+     * @return a SIS implementation containing the values of the given object (may be the
      *         given object itself), or {@code null} if the argument was null.
      */
     public static DefaultConversion castOrCopy(final Conversion object) {
@@ -355,7 +355,7 @@ public class DefaultConversion extends A
      * The default implementation returns {@code Conversion.class}.
      * Subclasses implementing a more specific GeoAPI interface shall override this method.
      *
-     * @return The conversion interface implemented by this class.
+     * @return the conversion interface implemented by this class.
      */
     @Override
     public Class<? extends Conversion> getInterface() {
@@ -381,12 +381,12 @@ public class DefaultConversion extends A
      * interface, but may also implement a more specific GeoAPI interface if {@code specialize(…)} has been able
      * to infer the type from this operation {@linkplain #getMethod() method}.
      *
-     * @param  <T>        Compile-time type of the {@code baseType} argument.
-     * @param  baseType   The base GeoAPI interface to be implemented by the conversion to return.
-     * @param  sourceCRS  The source CRS.
-     * @param  targetCRS  The target CRS.
-     * @param  factory    The factory to use for creating a transform from the parameters or for performing axis changes.
-     * @return The conversion of the given type between the given CRS.
+     * @param  <T>        compile-time type of the {@code baseType} argument.
+     * @param  baseType   the base GeoAPI interface to be implemented by the conversion to return.
+     * @param  sourceCRS  the source CRS.
+     * @param  targetCRS  the target CRS.
+     * @param  factory    the factory to use for creating a transform from the parameters or for performing axis changes.
+     * @return the conversion of the given type between the given CRS.
      * @throws ClassCastException if a contradiction is found between the given {@code baseType},
      *         the defining {@linkplain DefaultConversion#getInterface() conversion type} and
      *         the {@linkplain DefaultOperationMethod#getOperationType() method operation type}.
@@ -435,9 +435,9 @@ public class DefaultConversion extends A
      * Ensures that the {@code actual} CRS uses a datum which is equals, ignoring metadata,
      * to the datum of the {@code expected} CRS.
      *
-     * @param param     The parameter name, used only in case of error.
-     * @param expected  The CRS containing the expected datum, or {@code null}.
-     * @param actual    The CRS for which to check the datum, or {@code null}.
+     * @param  param     the parameter name, used only in case of error.
+     * @param  expected  the CRS containing the expected datum, or {@code null}.
+     * @param  actual    the CRS for which to check the datum, or {@code null}.
      * @throws MismatchedDatumException if the two CRS use different datum.
      */
     private static void ensureCompatibleDatum(final String param,
@@ -459,12 +459,12 @@ public class DefaultConversion extends A
      * For example if {@code sourceCRS} uses a {@code CartesianCS}, then {@code targetCRS} must use
      * a {@code CartesianCS} too.
      *
-     * @param transform The transform to which to concatenate axis changes.
-     * @param sourceCRS The first CRS of the pair for which to check for axes changes.
-     * @param targetCRS The second CRS of the pair for which to check for axes changes.
-     * @param interpDim The number of dimensions of the interpolation CRS, or 0 if none.
-     * @param isSource  {@code true} for pre-concatenating the changes, or {@code false} for post-concatenating.
-     * @param factory   The factory to use for performing axis changes.
+     * @param  transform  the transform to which to concatenate axis changes.
+     * @param  sourceCRS  the first CRS of the pair for which to check for axes changes.
+     * @param  targetCRS  the second CRS of the pair for which to check for axes changes.
+     * @param  interpDim  the number of dimensions of the interpolation CRS, or 0 if none.
+     * @param  isSource   {@code true} for pre-concatenating the changes, or {@code false} for post-concatenating.
+     * @param  factory    the factory to use for performing axis changes.
      */
     private static MathTransform swapAndScaleAxes(MathTransform transform,
             final CoordinateReferenceSystem sourceCRS,

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -323,7 +323,7 @@ public class DefaultOperationMethod exte
      * @return The identified object properties in a mutable map.
      */
     private static Map<String,Object> getProperties(final IdentifiedObject info, final Citation authority) {
-        final Map<String,Object> properties = new HashMap<>(IdentifiedObjects.getProperties(info));
+        final Map<String,Object> properties = new HashMap<String,Object>(IdentifiedObjects.getProperties(info));
         properties.put(NAME_KEY, new NamedIdentifier(authority, info.getName().getCode()));
         properties.remove(IDENTIFIERS_KEY);
         return properties;

Propchange: sis/branches/JDK7/core/sis-referencing/src/main/javadoc/overview.html
------------------------------------------------------------------------------
--- svn:mime-type (original)
+++ svn:mime-type Wed Dec  7 04:14:44 2016
@@ -1 +1 @@
-text/html
+text/html;charset=UTF-8

Modified: sis/branches/JDK7/core/sis-referencing/src/main/resources/org/apache/sis/referencing/factory/sql/EPSG_Finish.sql
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/resources/org/apache/sis/referencing/factory/sql/EPSG_Finish.sql?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/resources/org/apache/sis/referencing/factory/sql/EPSG_Finish.sql [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/resources/org/apache/sis/referencing/factory/sql/EPSG_Finish.sql [UTF-8] Wed Dec  7 04:14:44 2016
@@ -19,19 +19,6 @@ UPDATE epsg_coordoperationparamvalue SET
 
 
 
----
---- Extensions to EPSG dataset 8.9 for helping Apache SIS to find some coordinate operation paths.
----
----     NTF Paris (EPSG:4807)  →  NTF (EPSG:4275)  →  RGF93 (EPSG:4171)
----
-INSERT INTO epsg_coordoperation VALUES (48094, 'NTF (Paris) to RGF93 (1)', 'concatenated operation',
- 4807, 4171, NULL, 1, 3694, '?', 1, NULL, NULL, NULL, NULL, NULL, 'Apache SIS', '2016-04-22', NULL, FALSE, FALSE);
-INSERT INTO epsg_coordoperationpath VALUES
- (48094, 1763, 1),
- (48094, 1053, 2);
-
-
-
 --
 -- Additional indexes for the EPSG database. Those indexes are not declared
 -- in the SQL scripts distributed by EPSG. They are not required for proper

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/parameter/ParameterFormatTest.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -130,8 +130,8 @@ public final strictfp class ParameterFor
                 "│ Latitude of natural origin¹    │ Double │ Mandatory  │  [-80 … 84]°  │        40.0°  │\n" +
                 "│ Longitude of natural origin    │ Double │ Mandatory  │ [-180 … 180]° │       -60.0°  │\n" +
                 "│ Scale factor at natural origin │ Double │ Mandatory  │    (0 … ∞)    │         1.0   │\n" +
-                "│ False easting                  │ Double │ Optional   │   (-∞ … ∞) m  │      5000.0 m │\n" +
-                "│ False northing                 │ Double │ Optional   │   (-∞ … ∞) m  │     10000.0 m │\n" +
+                "│ False easting                  │ Double │ Optional   │   (−∞ … ∞) m  │      5000.0 m │\n" +
+                "│ False northing                 │ Double │ Optional   │   (−∞ … ∞) m  │     10000.0 m │\n" +
                 "└────────────────────────────────┴────────┴────────────┴───────────────┴───────────────┘\n" +
                 "¹ This parameter is shown for completeness, but should never have a value different than 0 for this projection.\n", text);
     }
@@ -162,7 +162,7 @@ public final strictfp class ParameterFor
                 "│ Latitude of natural origin¹    │ Double │  [-80 … 84]°  │  20.0°   │\n" +
                 "│ Longitude of natural origin    │ Double │ [-180 … 180]° │ -60.0°   │\n" +
                 "│ Scale factor at natural origin │ Double │    (0 … ∞)    │ 0.997    │\n" +
-                "│ False northing                 │ Double │   (-∞ … ∞) m  │  20.0 km │\n" +
+                "│ False northing                 │ Double │   (−∞ … ∞) m  │  20.0 km │\n" +
                 "└────────────────────────────────┴────────┴───────────────┴──────────┘\n" +
                 "¹ This parameter is shown for completeness, but should never have a value different than 0 for this projection.\n", text);
     }
@@ -184,7 +184,7 @@ public final strictfp class ParameterFor
                 "│ Latitude of natural origin¹    │ Double │  [-80 … 84]°        │    20°   │\n" +
                 "│ Longitude of natural origin    │ Double │ [-180 … 180]°       │   -60°   │\n" +
                 "│ Scale factor at natural origin │ Double │    (0 … ∞)          │ 0,997    │\n" +
-                "│ False northing                 │ Double │   (-∞ … ∞) m        │    20 km │\n" +
+                "│ False northing                 │ Double │   (−∞ … ∞) m        │    20 km │\n" +
                 "└────────────────────────────────┴────────┴─────────────────────┴──────────┘\n" +
                 "¹ This parameter is shown for completeness, but should never have a value different than 0 for this projection.\n", text);
     }
@@ -217,10 +217,10 @@ public final strictfp class ParameterFor
                 "║ EPSG: Scale factor at natural origin (8805) │ Double │ Mandatory  │    (0 … ∞)    │         1.0   ║\n" +
                 "║ OGC:  scale_factor                          │        │            │               │               ║\n" +
                 "╟─────────────────────────────────────────────┼────────┼────────────┼───────────────┼───────────────╢\n" +
-                "║ EPSG: False easting (8806)                  │ Double │ Optional   │   (-∞ … ∞) m  │      5000.0 m ║\n" +
+                "║ EPSG: False easting (8806)                  │ Double │ Optional   │   (−∞ … ∞) m  │      5000.0 m ║\n" +
                 "║ OGC:  false_easting                         │        │            │               │               ║\n" +
                 "╟─────────────────────────────────────────────┼────────┼────────────┼───────────────┼───────────────╢\n" +
-                "║ EPSG: False northing (8807)                 │ Double │ Optional   │   (-∞ … ∞) m  │     10000.0 m ║\n" +
+                "║ EPSG: False northing (8807)                 │ Double │ Optional   │   (−∞ … ∞) m  │     10000.0 m ║\n" +
                 "║ OGC:  false_northing                        │        │            │               │               ║\n" +
                 "╚═════════════════════════════════════════════╧════════╧════════════╧═══════════════╧═══════════════╝\n" +
                 "¹ This parameter is shown for completeness, but should never have a value different than 0 for this projection.\n", text);
@@ -252,7 +252,7 @@ public final strictfp class ParameterFor
                 "║ EPSG: Scale factor at natural origin (8805) │ Double │ Mandatory  │    (0 … ∞)    │ 0.997    ║\n" +
                 "║ OGC:  scale_factor                          │        │            │               │          ║\n" +
                 "╟─────────────────────────────────────────────┼────────┼────────────┼───────────────┼──────────╢\n" +
-                "║ EPSG: False northing (8807)                 │ Double │ Optional   │   (-∞ … ∞) m  │  20.0 km ║\n" +
+                "║ EPSG: False northing (8807)                 │ Double │ Optional   │   (−∞ … ∞) m  │  20.0 km ║\n" +
                 "║ OGC:  false_northing                        │        │            │               │          ║\n" +
                 "╚═════════════════════════════════════════════╧════════╧════════════╧═══════════════╧══════════╝\n" +
                 "¹ This parameter is shown for completeness, but should never have a value different than 0 for this projection.\n", text);
@@ -326,7 +326,7 @@ public final strictfp class ParameterFor
                 "│ latitude_of_origin¹ │ Double │  [-80 … 84]°  │  20.0°   │\n" +
                 "│ central_meridian    │ Double │ [-180 … 180]° │ -60.0°   │\n" +
                 "│ scale_factor        │ Double │    (0 … ∞)    │ 0.997    │\n" +
-                "│ false_northing      │ Double │   (-∞ … ∞) m  │  20.0 km │\n" +
+                "│ false_northing      │ Double │   (−∞ … ∞) m  │  20.0 km │\n" +
                 "└─────────────────────┴────────┴───────────────┴──────────┘\n" +
                 "¹ This parameter is shown for completeness, but should never have a value different than 0 for this projection.\n", text);
     }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/EPSGFactoryFallbackTest.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -25,10 +25,10 @@ import org.opengis.referencing.crs.Verti
 import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.crs.GeocentricCRS;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.referencing.crs.CRSAuthorityFactory;
 import org.opengis.referencing.datum.Datum;
 import org.opengis.referencing.datum.Ellipsoid;
 import org.opengis.referencing.datum.PrimeMeridian;
+import org.apache.sis.referencing.factory.GeodeticAuthorityFactory;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.Utilities;
 
@@ -180,7 +180,7 @@ public final strictfp class EPSGFactoryF
     /**
      * Sets the EPSG factory to the given instance and clears the cache of all {@link CommonCRS} enumeration values.
      */
-    private static void setEPSGFactory(final CRSAuthorityFactory factory) {
+    private static void setEPSGFactory(final GeodeticAuthorityFactory factory) {
         AuthorityFactories.EPSG(factory);
         for (final CommonCRS          crs : CommonCRS         .values()) crs.clear();
         for (final CommonCRS.Vertical crs : CommonCRS.Vertical.values()) crs.clear();
@@ -195,7 +195,7 @@ public final strictfp class EPSGFactoryF
     @Test
     @DependsOnMethod({"testGetAuthorityCodes", "testCreateCRS"})
     public void compareAllCodes() throws FactoryException {
-        final CRSAuthorityFactory EPSG = (CRSAuthorityFactory) AuthorityFactories.EPSG();
+        final GeodeticAuthorityFactory EPSG = AuthorityFactories.EPSG();
         try {
             setEPSGFactory(EPSGFactoryFallback.INSTANCE);
             final ArrayList<String> codes = new ArrayList<>(EPSGFactoryFallback.INSTANCE.getAuthorityCodes(CoordinateReferenceSystem.class));

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/GeodeticObjectVerifier.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -293,8 +293,8 @@ public final strictfp class GeodeticObje
      *     <td>{@link Units#METRE}</td>
      *     <td>{@link Units#METRE}</td></tr>
      * <tr><td>Axes range</td>
-     *     <td>[-∞ … ∞]</td>
-     *     <td>[-∞ … ∞]</td></tr>
+     *     <td>[−∞ … ∞]</td>
+     *     <td>[−∞ … ∞]</td></tr>
      * <tr><td>Axes range meaning</td>
      *     <td>{@code null}</td>
      *     <td>{@code null}</td>

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/crs/DefaultProjectedCRSTest.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -236,7 +236,7 @@ public final strictfp class DefaultProje
 
     /**
      * Tests WKT formatting in "internal" mode.
-     * This mode is similar to WKT 2 but shall include the axes of the base CRS.
+     * This mode is similar to WKT 2 but shall include the axes of the base CRS and more parameter identifiers.
      *
      * @throws FactoryException if the CRS creation failed.
      */
@@ -258,11 +258,11 @@ public final strictfp class DefaultProje
                 "      Unit[“grad”, 0.015707963267948967, Id[“EPSG”, 9105]]],\n" +
                 "  Conversion[“Lambert zone II”,\n" +
                 "    Method[“Lambert Conic Conformal (1SP)”, Id[“EPSG”, 9801], Id[“GeoTIFF”, 9]],\n" +
-                "    Parameter[“Latitude of natural origin”, 52.0, Id[“EPSG”, 8801]],\n" +
-                "    Parameter[“Longitude of natural origin”, 0.0, Id[“EPSG”, 8802]],\n" +
-                "    Parameter[“Scale factor at natural origin”, 0.99987742, Id[“EPSG”, 8805]],\n" +
-                "    Parameter[“False easting”, 600000.0, Id[“EPSG”, 8806]],\n" +
-                "    Parameter[“False northing”, 2200000.0, Id[“EPSG”, 8807]]],\n" +
+                "    Parameter[“Latitude of natural origin”, 52.0, Id[“EPSG”, 8801], Id[“GeoTIFF”, 3081]],\n" +
+                "    Parameter[“Longitude of natural origin”, 0.0, Id[“EPSG”, 8802], Id[“GeoTIFF”, 3080]],\n" +
+                "    Parameter[“Scale factor at natural origin”, 0.99987742, Id[“EPSG”, 8805], Id[“GeoTIFF”, 3092]],\n" +
+                "    Parameter[“False easting”, 600000.0, Id[“EPSG”, 8806], Id[“GeoTIFF”, 3082]],\n" +
+                "    Parameter[“False northing”, 2200000.0, Id[“EPSG”, 8807], Id[“GeoTIFF”, 3083]]],\n" +
                 "  CS[Cartesian, 2],\n" +
                 "    Axis[“Easting (E)”, east],\n" +
                 "    Axis[“Northing (N)”, north],\n" +

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/cs/DefaultCartesianCSTest.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -22,6 +22,7 @@ import org.opengis.test.Validators;
 import org.opengis.referencing.cs.AxisDirection;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.referencing.GeodeticObjectVerifier;
+import org.apache.sis.internal.util.Constants;
 import org.apache.sis.measure.Units;
 import org.apache.sis.test.XMLTestCase;
 import org.apache.sis.test.DependsOn;
@@ -215,9 +216,9 @@ public final strictfp class DefaultCarte
         final CoordinateSystemAxis N = cs.getAxis(1);
         assertEquals("name",    "Easting, northing (E,N)", cs.getName().getCode());
         assertEquals("remarks", "Used in ProjectedCRS.", cs.getRemarks().toString());
-        assertEpsgIdentifierEquals("4400", getSingleton(cs.getIdentifiers()));
-        assertEpsgIdentifierEquals("1",    getSingleton(E.getIdentifiers()));
-        assertEpsgIdentifierEquals("2",    getSingleton(N.getIdentifiers()));
+        assertEpsgIdentifierEquals(String.valueOf(Constants.EPSG_PROJECTED_CS), getSingleton(cs.getIdentifiers()));
+        assertEpsgIdentifierEquals("1", getSingleton(E.getIdentifiers()));
+        assertEpsgIdentifierEquals("2", getSingleton(N.getIdentifiers()));
         assertAxisEquals("Easting",  "E", AxisDirection.EAST,  Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Units.METRE, null, E);
         assertAxisEquals("Northing", "N", AxisDirection.NORTH, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Units.METRE, null, N);
         /*

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2001.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2001.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2001.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2001.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -16,9 +16,13 @@
  */
 package org.apache.sis.referencing.factory;
 
+import java.util.Map;
+import java.util.HashMap;
 import org.opengis.util.FactoryException;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.internal.system.Loggers;
+import org.apache.sis.internal.util.Constants;
+import org.apache.sis.referencing.factory.sql.EPSGFactory;
 
 // Test imports
 import org.junit.AfterClass;
@@ -27,7 +31,6 @@ import org.junit.FixMethodOrder;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 import org.junit.runners.MethodSorters;
-import org.apache.sis.referencing.factory.sql.EPSGFactory;
 
 import static org.opengis.test.Assert.*;
 
@@ -42,7 +45,7 @@ import static org.opengis.test.Assert.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @RunWith(JUnit4.class)
@@ -50,41 +53,60 @@ import static org.opengis.test.Assert.*;
 public final strictfp class GIGS2001 extends org.opengis.test.referencing.gigs.GIGS2001 {
     /**
      * The factory instance to use for the tests, or {@code null} if not available.
+     * This field is set by {@link #createFactory()} and cleared by {@link #close()}.
      */
-    static EPSGFactory INSTANCE;
+    public static EPSGFactory factory;
 
     /**
-     * The last failure message logged. Used for avoiding to repeat the same message many times.
+     * {@code true} if we failed to create the {@link #factory}.
      */
-    private static String failure;
+    private static boolean isUnavailable;
 
     /**
      * Creates a new test using the default authority factory.
      */
     public GIGS2001() {
-        super(INSTANCE);
+        super(factory);
     }
 
     /**
      * Creates the factory to use for all tests in this class.
+     * If this method fails to create the factory, then {@link #factory} is left to {@code null} value.
      *
      * @throws FactoryException if an error occurred while creating the factory.
      */
     @BeforeClass
+    @SuppressWarnings("null")
     public static void createFactory() throws FactoryException {
-        if (INSTANCE == null) try {
-            INSTANCE = new EPSGFactory(null);
-        } catch (UnavailableFactoryException e) {
-            final String message = e.toString();
-            if (!message.equals(failure)) {
-                failure = message;
-                Logging.getLogger(Loggers.CRS_FACTORY).warning(message);
+        if (!isUnavailable) {
+            EPSGFactory af = factory;
+            if (af == null) {
+                final GeodeticObjectFactory f = new GeodeticObjectFactory();
+                final Map<String,Object> properties = new HashMap<>(6);
+                assertNull(properties.put("datumFactory", f));
+                assertNull(properties.put("csFactory", f));
+                assertNull(properties.put("crsFactory", f));
+                try {
+                    af = new EPSGFactory(properties);
+                    assertEquals("Expected no Data Access Object (DAO) before the first test is run.",
+                                 0, ((ConcurrentAuthorityFactory) af).countAvailableDataAccess());
+                    /*
+                     * Above method call may fail if no data source has been specified.
+                     * Following method call may fail if a data source has been specified,
+                     * but the database does not contain the required tables.
+                     */
+                    assertNotNull(af.createUnit(String.valueOf(Constants.EPSG_METRE)));
+                    factory = af;                                                           // Must be last.
+                } catch (UnavailableFactoryException e) {
+                    isUnavailable = true;
+                    Logging.getLogger(Loggers.CRS_FACTORY).warning(e.toString());
+                } finally {
+                    if (factory != af) {
+                        af.close();
+                    }
+                }
             }
-            // Leave INSTANCE to null. This will have the effect of skipping tests.
-            return;
         }
-        assertEquals("Expected no Data Access Object (DAO) before the first test is run.",
-                0, ((ConcurrentAuthorityFactory) INSTANCE).countAvailableDataAccess());
     }
 
     /**
@@ -94,10 +116,11 @@ public final strictfp class GIGS2001 ext
      */
     @AfterClass
     public static void close() throws FactoryException {
-        if (INSTANCE != null) {
-            final int n = ((ConcurrentAuthorityFactory) INSTANCE).countAvailableDataAccess();
-            INSTANCE.close();
-            // Do not set INSTANCE to null, as it will be reused by other GIGS tests.
+        final EPSGFactory af = factory;
+        if (af != null) {
+            factory = null;
+            final int n = ((ConcurrentAuthorityFactory) af).countAvailableDataAccess();
+            af.close();
             assertBetween("Since we ran all tests sequantially, should have no more than 1 Data Access Object (DAO).", 0, 1, n);
         }
     }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2002.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2002.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2002.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2002.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -64,7 +64,7 @@ public final strictfp class GIGS2002 ext
      * Creates a new test using the default authority factory.
      */
     public GIGS2002() {
-        super(GIGS2001.INSTANCE);
+        super(GIGS2001.factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2003.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2003.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2003.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2003.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -52,7 +52,7 @@ public final strictfp class GIGS2003 ext
      * Creates a new test using the default authority factory.
      */
     public GIGS2003() {
-        super(GIGS2001.INSTANCE);
+        super(GIGS2001.factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2004.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2004.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2004.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2004.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -68,7 +68,7 @@ public final strictfp class GIGS2004 ext
      * Creates a new test using the default authority factory.
      */
     public GIGS2004() {
-        super(GIGS2001.INSTANCE, GIGS2001.INSTANCE);
+        super(GIGS2001.factory, GIGS2001.factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2005.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2005.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2005.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2005.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -65,7 +65,7 @@ public final strictfp class GIGS2005 ext
      * Creates a new test using the default authority factory.
      */
     public GIGS2005() {
-        super(GIGS2001.INSTANCE);
+        super(GIGS2001.factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2006.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2006.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2006.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2006.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -65,7 +65,7 @@ public final strictfp class GIGS2006 ext
      * Creates a new test using the default authority factory.
      */
     public GIGS2006() {
-        super(GIGS2001.INSTANCE);
+        super(GIGS2001.factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2007.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2007.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2007.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2007.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -52,7 +52,7 @@ public final strictfp class GIGS2007 ext
      * Creates a new test using the default authority factory.
      */
     public GIGS2007() {
-        super(GIGS2001.INSTANCE);
+        super(GIGS2001.factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2008.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2008.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2008.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2008.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -52,7 +52,7 @@ public final strictfp class GIGS2008 ext
      * Creates a new test using the default authority factory.
      */
     public GIGS2008() {
-        super(GIGS2001.INSTANCE, GIGS2001.INSTANCE);
+        super(GIGS2001.factory, GIGS2001.factory);
     }
 
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2009.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2009.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2009.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/GIGS2009.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -52,7 +52,7 @@ public final strictfp class GIGS2009 ext
      * Creates a new test using the default authority factory.
      */
     public GIGS2009() {
-        super(GIGS2001.INSTANCE);
+        super(GIGS2001.factory);
     }
 
     /**
@@ -73,6 +73,5 @@ public final strictfp class GIGS2009 ext
     @AfterClass
     public static void close() throws FactoryException {
         GIGS2001.close();
-        GIGS2001.INSTANCE = null;       // Since this is the last test of the 2000 series, we can let GC do its work.
     }
 }

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGDataFormatter.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -115,7 +115,7 @@ import java.nio.charset.StandardCharsets
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 public final class EPSGDataFormatter extends ScriptRunner {
@@ -190,7 +190,7 @@ public final class EPSGDataFormatter ext
     /**
      * Creates a new instance.
      *
-     * @param  c A dummy connection. Will be used for fetching metadata.
+     * @param  c  a dummy connection. Will be used for fetching metadata.
      * @throws SQLException if an error occurred while fetching metadata.
      */
     private EPSGDataFormatter(final Connection c) throws SQLException {
@@ -223,7 +223,7 @@ public final class EPSGDataFormatter ext
     /**
      * Returns {@code true} if the given line should be omitted from the script.
      *
-     * @param  line The line, without trailing {@code ';'}.
+     * @param  line  the line, without trailing {@code ';'}.
      * @return {@code true} if the line should be omitted.
      */
     private static boolean omit(final String line) {
@@ -234,9 +234,9 @@ public final class EPSGDataFormatter ext
     /**
      * Compacts the given file.
      *
-     * @param  inputFile    The input file where to read the SQL statements to compact.
-     * @param  outputFile   The output file where to write the compacted SQL statements.
-     * @param  encoding     The character encoding for both input and output files.
+     * @param  inputFile    the input file where to read the SQL statements to compact.
+     * @param  outputFile   the output file where to write the compacted SQL statements.
+     * @param  encoding     the character encoding for both input and output files.
      * @throws IOException  if an I/O operation failed.
      * @throws SQLException should never happen.
      */
@@ -276,11 +276,23 @@ public final class EPSGDataFormatter ext
     }
 
     /**
+     * Makes sure that {@link #execute(StringBuilder)} is invoked for every line. Whether the SQL statement
+     * is supported or not is irrelevant for this method since we do not know yet what will be the database
+     * engine; we just copy the SQL statements in a file without executing them.
+     *
+     * @return {@code true}.
+     */
+    @Override
+    protected boolean isSupported(final CharSequence sql) {
+        return true;
+    }
+
+    /**
      * "Executes" the given SQL statement. In the context of this {@code EPSGDataWriter} class,
      * executing a SQL statement means compacting it and writing it to the output file.
      *
-     * @param  sql The SQL statement to compact.
-     * @return The number of rows added.
+     * @param  sql  the SQL statement to compact.
+     * @return the number of rows added.
      * @throws IOException if an I/O operation failed.
      * @throws SQLException if a syntax error happens.
      */
@@ -536,7 +548,7 @@ public final class EPSGDataFormatter ext
      * <p><b>Note:</b> current version does not use codepoint API
      * on the assumption that it is not needed for EPSG's SQL files.</p>
      *
-     * @param buffer The string in which to perform the removal.
+     * @param  buffer  the string in which to perform the removal.
      */
     static void removeLF(final StringBuilder buffer) {
         int i = buffer.length();

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGFactoryTest.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -20,7 +20,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.List;
 import java.util.Locale;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Collections;
 import javax.measure.Unit;
@@ -47,7 +46,6 @@ import org.opengis.referencing.operation
 import org.opengis.referencing.operation.MathTransform;
 import org.opengis.referencing.operation.Projection;
 import org.opengis.util.FactoryException;
-import org.apache.sis.util.logging.Logging;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.referencing.CRS;
 import org.apache.sis.referencing.cs.AxesConvention;
@@ -55,9 +53,7 @@ import org.apache.sis.referencing.crs.De
 import org.apache.sis.referencing.datum.BursaWolfParameters;
 import org.apache.sis.referencing.datum.DefaultGeodeticDatum;
 import org.apache.sis.referencing.operation.AbstractCoordinateOperation;
-import org.apache.sis.referencing.factory.GeodeticObjectFactory;
 import org.apache.sis.referencing.factory.IdentifiedObjectFinder;
-import org.apache.sis.referencing.factory.UnavailableFactoryException;
 
 // Test imports
 import org.junit.Rule;
@@ -70,6 +66,7 @@ import org.apache.sis.test.TestCase;
 import org.apache.sis.test.LoggingWatcher;
 import org.apache.sis.test.DependsOnMethod;
 import org.apache.sis.test.DependsOn;
+import org.apache.sis.referencing.factory.GIGS2001;
 
 import static org.junit.Assume.assumeNotNull;
 import static org.apache.sis.test.ReferencingAssert.*;
@@ -93,28 +90,13 @@ import static org.apache.sis.test.Refere
 })
 public final strictfp class EPSGFactoryTest extends TestCase {
     /**
-     * The factory instance to use for the tests, or {@code null} if not available.
-     */
-    private static EPSGFactory factory;
-
-    /**
      * Creates the factory to use for all tests in this class.
      *
      * @throws FactoryException if an error occurred while creating the factory.
      */
     @BeforeClass
     public static void createFactory() throws FactoryException {
-        final GeodeticObjectFactory f = new GeodeticObjectFactory();
-        final Map<String,Object> properties = new HashMap<>(6);
-        assertNull(properties.put("datumFactory", f));
-        assertNull(properties.put("csFactory", f));
-        assertNull(properties.put("crsFactory", f));
-        try {
-            factory = new EPSGFactory(properties);
-        } catch (UnavailableFactoryException e) {
-            Logging.getLogger(Loggers.CRS_FACTORY).warning(e.toString());
-            // Leave INSTANCE to null. This will have the effect of skipping tests.
-        }
+        GIGS2001.createFactory();
     }
 
     /**
@@ -124,10 +106,7 @@ public final strictfp class EPSGFactoryT
      */
     @AfterClass
     public static void close() throws FactoryException {
-        if (factory != null) {
-            factory.close();
-            factory = null;
-        }
+        GIGS2001.close();
     }
 
     /**
@@ -161,6 +140,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testWGS84() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final GeographicCRS crs = factory.createGeographicCRS("EPSG:4326");
         assertEpsgNameAndIdentifierEqual("WGS 84", 4326, crs);
@@ -182,6 +162,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testWGS84")
     public void testGeographic2D() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final GeographicCRS crs = factory.createGeographicCRS("4274");
         assertEpsgNameAndIdentifierEqual("Datum 73", 4274, crs);
@@ -202,6 +183,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testGeographic2D")
     public void testGeographic3D() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final GeographicCRS crs = factory.createGeographicCRS("EPSG::4993");
         assertEpsgNameAndIdentifierEqual("Lao 1997", 4993, crs);
@@ -219,6 +201,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testGeocentric() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final GeocentricCRS crs = factory.createGeocentricCRS("epsg:4915");
         assertEpsgNameAndIdentifierEqual("ITRF93", 4915, crs);
@@ -237,6 +220,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testGeographic2D")
     public void testProjected() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final ProjectedCRS crs = factory.createProjectedCRS("2027");
         assertEpsgNameAndIdentifierEqual("NAD27(76) / UTM zone 15N", 2027, crs);
@@ -274,6 +258,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testProjected")
     public void testProjectedNorthEast() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final ProjectedCRS crs = factory.createProjectedCRS(" EPSG : 2442 ");
         assertEpsgNameAndIdentifierEqual("Beijing 1954 / 3-degree Gauss-Kruger CM 135E", 2442, crs);
@@ -306,6 +291,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testProjected")
     public void testProjectedWithSharedConversion() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final ProjectedCRS crs = factory.createProjectedCRS("32210");
         assertEpsgNameAndIdentifierEqual("WGS 72 / UTM zone 10N", 32210, crs);
@@ -344,6 +330,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testCreateByName")
     public void testProjectedByName() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final ProjectedCRS crs = factory.createProjectedCRS("NTF (Paris) / Lambert zone I");
         assertEpsgNameAndIdentifierEqual("NTF (Paris) / Lambert zone I", 27571, crs);
@@ -371,6 +358,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @Ignore("“Lambert Azimuthal Equal Area (Spherical)” projection is not yet implemented.")
     public void testProjectedOnPole() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final ProjectedCRS crs = factory.createProjectedCRS("3408");
         assertEpsgNameAndIdentifierEqual("NSIDC EASE-Grid North", 3408, crs);
@@ -390,6 +378,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testGoogleProjection() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final ProjectedCRS crs = factory.createProjectedCRS("3857");
         assertEpsgNameAndIdentifierEqual("WGS 84 / Pseudo-Mercator", 3857, crs);
@@ -408,6 +397,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testEngineering() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final EngineeringCRS crs = factory.createEngineeringCRS("EPSG:5801");
         assertEpsgNameAndIdentifierEqual("Barcelona Grid B1", 5801, crs);
@@ -423,6 +413,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testVertical() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final VerticalCRS crs = factory.createVerticalCRS("EPSG:5735");
         assertEpsgNameAndIdentifierEqual("Black Sea height", 5735, crs);
@@ -440,6 +431,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod({"testGeographic2D", "testVertical"})
     public void testCompound() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final CompoundCRS crs = factory.createCompoundCRS("EPSG:7400");
         assertEpsgNameAndIdentifierEqual("NTF (Paris) + NGF IGN69 height", 7400, crs);
@@ -469,6 +461,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testDeprecatedCoordinateSystems() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         for (final Map.Entry<Integer,Integer> entry : EPSGDataAccess.deprecatedCS().entrySet()) {
             final CoordinateSystem expected = factory.createEllipsoidalCS(entry.getValue().toString());
@@ -511,6 +504,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod({"testGeographic2D", "testDeprecatedCoordinateSystems"})
     public void testDeprecatedGeographic() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
 
         final GeographicCRS crs = factory.createGeographicCRS("63266405");
@@ -532,6 +526,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod({"testDeprecatedGeographic", "testDeprecatedCoordinateSystems"})
     public void testDeprecatedProjected() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
 
         final ProjectedCRS crs = factory.createProjectedCRS("3786");
@@ -564,6 +559,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testCreateByName() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         assertSame   (factory.createUnit("9002"), factory.createUnit("foot"));
         assertNotSame(factory.createUnit("9001"), factory.createUnit("foot"));
@@ -595,6 +591,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testAuthorityCodes() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         /*
          * Most basic objects.
@@ -761,6 +758,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testDescriptionText() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
 
         assertEquals("World Geodetic System 1984", factory.getDescriptionText( "6326").toString(Locale.US));
@@ -778,6 +776,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testProjectedWithSharedConversion")
     public void testConversion() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         /*
          * Fetch directly the "UTM zone 10N" operation. Because this operation was not obtained in
@@ -834,6 +833,7 @@ public final strictfp class EPSGFactoryT
      */
     @Test
     public void testSimpleTransformation() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final CoordinateOperation operation = factory.createCoordinateOperation("1764");
         assertEpsgNameAndIdentifierEqual("NTF (Paris) to NTF (2)", 1764, operation);
@@ -851,6 +851,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testSimpleTransformation")
     public void testTransformation() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final CoordinateOperation operation = factory.createCoordinateOperation("1609");
         assertEpsgNameAndIdentifierEqual("BD72 to WGS 84 (1)", 1609, operation);
@@ -867,6 +868,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testTransformation")
     public void testCreateFromCoordinateReferenceSystemCodes() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         /*
          * ED50 (4230)  to  WGS 84 (4326)  using
@@ -940,6 +942,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testWGS84")
     public void testFindGeographic() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final IdentifiedObjectFinder finder = factory.newIdentifiedObjectFinder();
         final DefaultGeographicCRS crs = (DefaultGeographicCRS) CRS.fromWKT(
@@ -987,6 +990,7 @@ public final strictfp class EPSGFactoryT
     @Test
     @DependsOnMethod("testFindGeographic")
     public void testFindProjected() throws FactoryException {
+        final EPSGFactory factory = GIGS2001.factory;
         assumeNotNull(factory);
         final IdentifiedObjectFinder finder = factory.newIdentifiedObjectFinder();
         /*

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/factory/sql/EPSGInstallerTest.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -60,7 +60,7 @@ import static org.junit.Assume.*;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.7
- * @version 0.7
+ * @version 0.8
  * @module
  */
 @DependsOn(EPSGFactoryTest.class)
@@ -143,14 +143,9 @@ public final strictfp class EPSGInstalle
      * Tests the creation of an EPSG database on HSQLDB.
      * This test is skipped if the SQL scripts are not found.
      *
-     * <p>This test is skipped by default because HSQLDB changes the {@code java.util.logging} configuration,
-     * which causes failures in all Apache SIS tests that verify the logging messages after execution of this
-     * test. This impact this {@code EPSGInstallerTest} class, but also other test classes.</p>
-     *
      * @throws Exception if an error occurred while creating the database.
      */
     @Test
-    @Ignore("Skipped for protecting java.util.logging configuration against changes.")
     public void testCreationOnHSQLDB() throws Exception {
         final InstallationScriptProvider scripts = getScripts();            // Needs to be invoked first.
         final DataSource ds = (DataSource) Class.forName("org.hsqldb.jdbc.JDBCDataSource").newInstance();
@@ -166,6 +161,30 @@ public final strictfp class EPSGInstalle
         loggings.assertNoUnexpectedLog();
     }
 
+    /**
+     * Tests the creation of an EPSG database on PostgreSQL. This test is disabled by default.
+     * To run this test, the tester needs to launch on {@code "localhost"} a PostgreSQL server
+     * having an empty database named {@code "SpatialMetadataTest"}. After the test completion,
+     * one can verify the {@code "EPSG"} schema created by the test, then delete that schema for future test executions
+     * (this test does <strong>not</strong> delete by itself the schema that it created).
+     *
+     * @throws Exception if an error occurred while creating the database.
+     *
+     * @since 0.8
+     */
+    @Test
+    @Ignore("This test need to be run manually on a machine having a local PostgreSQL database.")
+    public void testCreationOnPostgreSQL() throws Exception {
+        final InstallationScriptProvider scripts = getScripts();            // Needs to be invoked first.
+        final DataSource ds = (DataSource) Class.forName("org.postgresql.ds.PGSimpleDataSource").newInstance();
+        final Class<?> dsc = ds.getClass();
+        dsc.getMethod("setServerName",   String.class).invoke(ds, "localhost");
+        dsc.getMethod("setDatabaseName", String.class).invoke(ds, "SpatialMetadataTest");
+        createAndTest(ds, scripts);
+        loggings.assertNextLogContains("EPSG", "jdbc:postgresql://localhost/SpatialMetadataTest");
+        loggings.assertNoUnexpectedLog();
+    }
+
     /**
      * Requests the "WGS84" and the "WGS72 / UTM zone 15N" coordinate reference systems from the EPSG database
      * at the given {@code DataSource}. Those requests should trig the creation of the EPSG database.

Modified: sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java?rev=1773010&r1=1773009&r2=1773010&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/DefaultTransformationTest.java [UTF-8] Wed Dec  7 04:14:44 2016
@@ -59,7 +59,7 @@ public final strictfp class DefaultTrans
     private static DefaultGeocentricCRS createCRS(final String name, final GeodeticDatum datum) {
         Map<String,?> properties = IdentifiedObjects.getProperties(datum, DefaultGeocentricCRS.IDENTIFIERS_KEY);
         if (name != null) {
-            final Map<String,Object> copy = new HashMap<>(properties);
+            final Map<String,Object> copy = new HashMap<String,Object>(properties);
             copy.put(DefaultGeocentricCRS.NAME_KEY, name);
             properties = copy;
         }




Mime
View raw message