Author: desruisseaux
Date: Sat Sep 23 11:47:20 2017
New Revision: 1809404

URL: http://svn.apache.org/viewvc?rev=1809404&view=rev
Log:
Merge from JDK7 branch.

Added:
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java
      - copied, changed from r1809390, 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/
      - copied from r1809390, 
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/
    
sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/folder/
      - copied from r1809390, 
sis/branches/JDK7/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/folder/
    sis/trunk/storage/sis-storage/src/test/resources/org/apache/sis/internal/
      - copied from r1809390, 
sis/branches/JDK7/storage/sis-storage/src/test/resources/org/apache/sis/internal/
Removed:
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractDataSet.java
Modified:
    sis/trunk/   (props changed)
    sis/trunk/application/pom.xml
    sis/trunk/application/sis-console/src/main/artifact/README
    sis/trunk/application/sis-console/src/main/artifact/lib/README
    
sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataCommandTest.java
    
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
    
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/ESRI.java
    
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java
    
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/JTS.java
    
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Java2D.java
    
sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java
    
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
    
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
    
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
    
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
    
sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory
    
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AuthorityFactoriesTest.java
    
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
    
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
    
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java
    
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
    
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
    sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java
    
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
    
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/QuietLogRecord.java
    
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/WarningListeners.java
    
sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/UnitsTest.java
    sis/trunk/ide-project/NetBeans/build.xml
    sis/trunk/ide-project/NetBeans/nbproject/project.properties
    sis/trunk/pom.xml
    
sis/trunk/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/LandsatReader.java
    
sis/trunk/storage/sis-earth-observation/src/test/java/org/apache/sis/storage/earthobservation/LandsatReaderTest.java
    
sis/trunk/storage/sis-gdal/src/main/java/org/apache/sis/storage/gdal/Proj4.java
    
sis/trunk/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/GeoTiffStore.java
    
sis/trunk/storage/sis-geotiff/src/test/java/org/apache/sis/storage/geotiff/CRSBuilderTest.java
    sis/trunk/storage/sis-netcdf/pom.xml
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Axis.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/DataType.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Decoder.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/DiscreteSampling.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/GridGeometry.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/NamedElement.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Resources.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Resources.properties
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Resources_fr.properties
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/Variable.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/ChannelDecoder.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/Dimension.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/FeaturesInfo.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfo.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/VariableInfo.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/impl/package-info.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/package-info.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/DecoderWrapper.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/FeaturesWrapper.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/GridGeometryWrapper.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/LogAdapter.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/VariableWrapper.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/ucar/package-info.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/AttributeNames.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/MetadataReader.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStore.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/NetcdfStoreProvider.java
    
sis/trunk/storage/sis-netcdf/src/main/java/org/apache/sis/storage/netcdf/package-info.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/DataTypeTest.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/TestCase.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/VariableTest.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/ChannelDecoderTest.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/GridGeometryInfoTest.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/internal/netcdf/impl/VariableInfoTest.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/MetadataReaderTest.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/NetcdfStoreProviderTest.java
    
sis/trunk/storage/sis-netcdf/src/test/java/org/apache/sis/storage/netcdf/NetcdfStoreTest.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractFeatureSet.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/AbstractResource.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources.properties
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/Resources_fr.properties
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/StoreTypeDetector.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/URIDataStore.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/csv/Store.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/FolderStoreProvider.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/folder/Store.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelData.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelDataInput.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelFactory.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/IOUtilities.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/Store.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/Aggregate.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStore.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreProvider.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java
    
sis/trunk/storage/sis-storage/src/main/java/org/apache/sis/storage/StorageConnector.java
    
sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/io/ChannelDataInputTest.java
    
sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/internal/storage/io/IOUtilitiesTest.java
    
sis/trunk/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
    
sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/gpx/Store.java
    
sis/trunk/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxDataStore.java

Propchange: sis/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Sep 23 11:47:20 2017
@@ -1,5 +1,5 @@
 /sis/branches/Android:1430670-1480699
 /sis/branches/JDK6:1394364-1758914
-/sis/branches/JDK7:1394913-1807628
-/sis/branches/JDK8:1584960-1807624
+/sis/branches/JDK7:1394913-1809390
+/sis/branches/JDK8:1584960-1809384
 /sis/branches/JDK9:1773327-1803064

Modified: sis/trunk/application/pom.xml
URL: 
http://svn.apache.org/viewvc/sis/trunk/application/pom.xml?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- sis/trunk/application/pom.xml (original)
+++ sis/trunk/application/pom.xml Sat Sep 23 11:47:20 2017
@@ -76,6 +76,7 @@
         <executions>
           <execution>
             <goals>
+              <goal>compile-resources</goal>
               <goal>collect-jars</goal>
             </goals>
           </execution>

Modified: sis/trunk/application/sis-console/src/main/artifact/README
URL: 
http://svn.apache.org/viewvc/sis/trunk/application/sis-console/src/main/artifact/README?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- sis/trunk/application/sis-console/src/main/artifact/README [UTF-8] 
(original)
+++ sis/trunk/application/sis-console/src/main/artifact/README [UTF-8] Sat Sep 
23 11:47:20 2017
@@ -44,7 +44,7 @@ encoding to UTF-8:
     export SIS_OPTS="--encoding UTF-8"
 
 Optional dependencies can be added to the 'lib' folder. For example adding the
-UCAR NetCDF library in the 'lib' folder will cause Apache SIS to decode a
+UCAR netCDF library in the 'lib' folder will cause Apache SIS to decode a
 wider range of file formats like NcML files.
 
 

Modified: sis/trunk/application/sis-console/src/main/artifact/lib/README
URL: 
http://svn.apache.org/viewvc/sis/trunk/application/sis-console/src/main/artifact/lib/README?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- sis/trunk/application/sis-console/src/main/artifact/lib/README [UTF-8] 
(original)
+++ sis/trunk/application/sis-console/src/main/artifact/lib/README [UTF-8] Sat 
Sep 23 11:47:20 2017
@@ -1,4 +1,4 @@
 This directory contains the sis.jar file together with optional dependencies.
 Recognized optional dependencies are:
 
-  - UCAR NetCDF library
+  - UCAR netCDF library

Modified: 
sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataCommandTest.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataCommandTest.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataCommandTest.java
 [UTF-8] (original)
+++ 
sis/trunk/application/sis-console/src/test/java/org/apache/sis/console/MetadataCommandTest.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -37,7 +37,7 @@ import static org.junit.Assert.*;
 @DependsOn(CommandRunnerTest.class)
 public final strictfp class MetadataCommandTest extends TestCase {
     /**
-     * Tests the sub-command on a NetCDF file.
+     * Tests the sub-command on a netCDF file.
      *
      * @throws Exception if an error occurred while creating the command.
      */
@@ -52,7 +52,7 @@ public final strictfp class MetadataComm
     }
 
     /**
-     * Verifies the NetCDF metadata. The given string can be either a text 
format or XML format.
+     * Verifies the netCDF metadata. The given string can be either a text 
format or XML format.
      * This method will check only for some keyword - this is not an extensive 
check of the result.
      */
     private static void verifyNetCDF(final String expectedHeader, final String 
result) {

Modified: 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -43,6 +43,7 @@ import org.apache.sis.util.logging.Loggi
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Vocabulary;
 import org.apache.sis.internal.util.CollectionsExt;
+import org.apache.sis.internal.feature.Geometries;
 import org.apache.sis.internal.system.Modules;
 import org.apache.sis.referencing.IdentifiedObjects;
 import org.apache.sis.math.MathFunctions;
@@ -88,6 +89,11 @@ public class FeatureFormat extends Tabul
     private static final long serialVersionUID = -5792086817264884947L;
 
     /**
+     * The separator to use in comma-separated lists.
+     */
+    private static final String SEPARATOR = ", ";
+
+    /**
      * An instance created when first needed and potentially shared.
      */
     private static final AtomicReference<FeatureFormat> INSTANCE = new 
AtomicReference<>();
@@ -340,7 +346,7 @@ public class FeatureFormat extends Tabul
             String separator = " ⇾ ";                                       // 
UML symbol for inheritance.
             for (final FeatureType parent : featureType.getSuperTypes()) {
                 
toAppendTo.append(separator).append(toString(parent.getName()));
-                separator = ", ";
+                separator = SEPARATOR;
             }
         }
         toAppendTo.append(getLineSeparator());
@@ -442,19 +448,37 @@ public class FeatureFormat extends Tabul
                 if (!isFirstColumn) nextColumn(table);
                 isFirstColumn = false;
                 switch (column) {
+                    /*
+                     * Human-readable name of the property. May contains any 
characters (spaces, ideographs, etc).
+                     * In many cases, this information is not provided and the 
whole column is skipped.
+                     */
                     case DESIGNATION: {
                         final InternationalString d = 
propertyType.getDesignation();
                         if (d != null) table.append(d.toString(displayLocale));
                         break;
                     }
+                    /*
+                     * Machine-readable name of the property (identifier). 
This information is mandatory.
+                     * This name is usually shorter than the designation and 
should contain only valid
+                     * Unicode identifier characters (e.g. no spaces).
+                     */
                     case NAME: {
                         table.append(toString(propertyType.getName()));
                         break;
                     }
+                    /*
+                     * The base class or interface for all values in 
properties of the same type.
+                     * This is typically String, Number, Integer, Geometry or 
URL.
+                     */
                     case TYPE: {
                         table.append(valueType);
                         break;
                     }
+                    /*
+                     * Minimum and maximum number of occurrences allowed for 
this property.
+                     * If we are formatting a Feature instead than a 
FeatureType, then the
+                     * actual number of values is also formatted. Example: 42 
∈ [0 … ∞]
+                     */
                     case CARDINALITY: {
                         table.setCellAlignment(TableAppender.ALIGN_RIGHT);
                         if (cardinality >= 0) {
@@ -480,6 +504,12 @@ public class FeatureFormat extends Tabul
                         }
                         break;
                     }
+                    /*
+                     * If formatting a FeatureType, the default value. If 
formatting a Feature, the actual value.
+                     * A java.text.Format instance dedicated to the value 
class is used if possible. In addition
+                     * to types for which a java.text.Format may be available, 
we also have to check for other
+                     * special cases. If there is more than one value, they 
are formatted as a coma-separated list.
+                     */
                     case VALUE: {
                         table.setCellAlignment(TableAppender.ALIGN_LEFT);
                         final Format format = getFormat(valueClass);           
                 // Null if valueClass is null.
@@ -534,28 +564,62 @@ public class FeatureFormat extends Tabul
                                 length = formatValue(value, 
table.append(separator), length);
                                 buffer.setLength(0);
                                 if (length < 0) break;      // Value is too 
long, abandon remaining iterations.
-                                separator = ", ";
-                                length += 2;
+                                separator = SEPARATOR;
+                                length += SEPARATOR.length();
                             }
                         }
                         break;
                     }
+                    /*
+                     * Characteristics are optional information attached to 
some values. For example if a property
+                     * value is a temperature measurement, a characteritic of 
that value may be the unit of measure.
+                     * Characteristics are handled as "attributes of 
attributes".
+                     */
                     case CHARACTERISTICS: {
                         if (propertyType instanceof DefaultAttributeType<?>) {
+                            int length = 0;
                             String separator = "";
-                            for (final DefaultAttributeType<?> attribute : 
((DefaultAttributeType<?>) propertyType).characteristics().values()) {
-                                
table.append(separator).append(toString(attribute.getName()));
-                                Object c = attribute.getDefaultValue();
+format:                     for (final DefaultAttributeType<?> ct : 
((DefaultAttributeType<?>) propertyType).characteristics().values()) {
+                                /*
+                                 * Format the characteristic name. We will 
append the value(s) later.
+                                 * We keep trace of the text length in order 
to stop formatting if the
+                                 * text become too long.
+                                 */
+                                final GenericName cn = ct.getName();
+                                final String cs = toString(cn);
+                                table.append(separator).append(cs);
+                                length += separator.length() + cs.length();
+                                Collection<?> cv = 
CollectionsExt.singletonOrEmpty(ct.getDefaultValue());
                                 if (feature != null) {
-                                    final Object p = 
feature.getProperty(propertyType.getName().toString());
-                                    if (p instanceof AbstractAttribute<?>) {   
 // Should always be true, but we are paranoiac.
-                                        c = ((AbstractAttribute<?>) 
p).characteristics().get(attribute.getName().toString());
+                                    /*
+                                     * Usually, the property 'cp' below is 
null because all features use the same
+                                     * characteristic value (for example the 
same unit of measurement),  which is
+                                     * given by the default value 'cv'.  
Nevertheless we have to check if current
+                                     * feature overrides this characteristic.
+                                     */
+                                    final Object cp = 
feature.getProperty(propertyType.getName().toString());
+                                    if (cp instanceof AbstractAttribute<?>) {  
          // Should always be true, but we are paranoiac.
+                                        AbstractAttribute<?> ca = 
((AbstractAttribute<?>) cp).characteristics().get(cn.toString());
+                                        if (ca != null) cv = ca.getValues();
                                     }
                                 }
-                                if (c != null) {
-                                    formatValue(c, table.append(" = "), 0);
+                                /*
+                                 * Now format the value, separated from the 
name with " = ". Example: unit = m/s
+                                 * If the value accepts multi-occurrences, we 
will format the value between {…}.
+                                 * We use {…} because we may have more than 
one characteristic in the same cell,
+                                 * so we need a way to distinguish 
multi-values from multi-characteristics.
+                                 */
+                                final boolean multi = ct.getMaximumOccurs() > 
1;
+                                String sep = multi ? " = {" : " = ";
+                                for (Object c : cv) {
+                                    length = formatValue(c, table.append(sep), 
length += sep.length());
+                                    if (length < 0) break format;   // Value 
is too long, abandon remaining iterations.
+                                    sep = SEPARATOR;
+                                }
+                                separator = SEPARATOR;
+                                if (multi && sep == SEPARATOR) {
+                                    table.append('}');
                                 }
-                                separator = ", ";
                             }
                         }
                         break;
@@ -614,7 +678,7 @@ public class FeatureFormat extends Tabul
      *         the length exceed the maximal length (in which case the caller 
should break iteration).
      */
     private int formatValue(final Object value, final TableAppender table, 
final int length) {
-        final String text;
+        String text;
         if (value instanceof InternationalString) {
             text = ((InternationalString) value).toString(displayLocale);
         } else if (value instanceof GenericName) {
@@ -623,7 +687,7 @@ public class FeatureFormat extends Tabul
             text = toString(((AbstractIdentifiedType) value).getName());
         } else if (value instanceof IdentifiedObject) {
             text = IdentifiedObjects.getIdentifierOrName((IdentifiedObject) 
value);
-        } else {
+        } else if ((text = Geometries.toString(value)) == null) {
             text = value.toString();
         }
         final int remaining = MAXIMAL_VALUE_LENGTH - length;

Modified: 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/ESRI.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/ESRI.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/ESRI.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/ESRI.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -26,6 +26,7 @@ import com.esri.core.geometry.Point;
 import org.apache.sis.geometry.GeneralEnvelope;
 import org.apache.sis.setup.GeometryLibrary;
 import org.apache.sis.math.Vector;
+import org.apache.sis.util.Classes;
 
 
 /**
@@ -48,6 +49,14 @@ final class ESRI extends Geometries<Geom
     }
 
     /**
+     * If the given object is a JTS geometry, returns a short string 
representation the class name.
+     */
+    @Override
+    final String tryGetLabel(Object geometry) {
+        return (geometry instanceof Geometry) ? 
Classes.getShortClassName(geometry) : null;
+    }
+
+    /**
      * If the given object is an ESRI geometry and its envelope is non-empty, 
returns
      * that envelope as an Apache SIS implementation. Otherwise returns {@code 
null}.
      *

Modified: 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Geometries.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -93,7 +93,7 @@ public abstract class Geometries<G> {
         this.pointClass    = pointClass;
         this.polylineClass = polylineClass;
         this.polygonClass  = polygonClass;
-        fallback = implementation;
+        this.fallback      = implementation;
     }
 
     /**
@@ -178,7 +178,7 @@ public abstract class Geometries<G> {
     abstract GeneralEnvelope tryGetEnvelope(Object geometry);
 
     /**
-     * If the given object is one of the recognized type and its envelope is 
non-empty,
+     * If the given object is one of the recognized types and its envelope is 
non-empty,
      * returns that envelope as an Apache SIS implementation. Otherwise 
returns {@code null}.
      *
      * @param  geometry  the geometry from which to get the envelope, or 
{@code null}.
@@ -192,6 +192,35 @@ public abstract class Geometries<G> {
         }
         return null;
     }
+
+    /**
+     * If the given geometry is the type supported by this {@code Geometries} 
instance,
+     * returns a short string representation the class name. Otherwise returns 
{@code null}.
+     */
+    abstract String tryGetLabel(Object geometry);
+
+    /**
+     * If the given object is one of the recognized types, returns a short 
string representation
+     * (typically the class name and the bounds). Otherwise returns {@code 
null}.
+     *
+     * @param  geometry  the geometry from which to get a string 
representation, or {@code null}.
+     * @return a short string representation of the given geometry, or {@code 
null} if the given
+     *         object is not a recognized geometry.
+     */
+    public static String toString(final Object geometry) {
+        for (Geometries<?> g = implementation; g != null; g = g.fallback) {
+            String s = g.tryGetLabel(geometry);
+            if (s != null) {
+                GeneralEnvelope env = g.tryGetEnvelope(geometry);
+                if (env != null) {
+                    final String bbox = env.toString();
+                    s += bbox.substring(bbox.indexOf('('));
+                }
+                return s;
+            }
+        }
+        return null;
+    }
 
     /**
      * Creates a two-dimensional point from the given coordinate. If the CRS 
is geographic, then the

Modified: 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/JTS.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/JTS.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/JTS.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/JTS.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -21,6 +21,7 @@ import java.lang.reflect.Method;
 import java.lang.reflect.InvocationTargetException;
 import org.apache.sis.geometry.GeneralEnvelope;
 import org.apache.sis.math.Vector;
+import org.apache.sis.util.Classes;
 
 
 /**
@@ -62,6 +63,14 @@ final class JTS extends Geometries<Objec
     }
 
     /**
+     * If the given object is a JTS geometry, returns a short string 
representation the class name.
+     */
+    @Override
+    final String tryGetLabel(Object geometry) {
+        return (rootClass.isInstance(geometry)) ? 
Classes.getShortClassName(geometry) : null;
+    }
+
+    /**
      * If the given object is a JTS geometry and its envelope is non-empty, 
returns
      * that envelope as an Apache SIS implementation. Otherwise returns {@code 
null}.
      *

Modified: 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Java2D.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Java2D.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Java2D.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-feature/src/main/java/org/apache/sis/internal/feature/Java2D.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -27,6 +27,7 @@ import org.apache.sis.internal.jdk8.JDK8
 import org.apache.sis.setup.GeometryLibrary;
 import org.apache.sis.internal.referencing.j2d.ShapeUtilities;
 import org.apache.sis.math.Vector;
+import org.apache.sis.util.Classes;
 
 
 /**
@@ -49,6 +50,21 @@ final class Java2D extends Geometries<Sh
     }
 
     /**
+     * If the given geometry is a Java2D geometry, returns a short string 
representation the class name,
+     * ignoring the primitive type specialization. For example if the class is 
{@code Rectangle2D.Float},
+     * then this method returns {@code "Rectangle2D"}.
+     */
+    @Override
+    final String tryGetLabel(Object geometry) {
+        if (geometry instanceof Shape) {
+            Class<?> c = geometry.getClass();
+            Class<?> e = c.getEnclosingClass();
+            return Classes.getShortName(e != null ? e : c);
+        }
+        return null;
+    }
+
+    /**
      * If the given object is a Java2D geometry and its envelope is non-empty, 
returns
      * that envelope as an Apache SIS implementation. Otherwise returns {@code 
null}.
      *

Modified: 
sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureFormatTest.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -154,16 +154,16 @@ public final strictfp class FeatureForma
         final FeatureFormat format = create();
         final String text = format.format(feature);
         assertMultilinesEquals("World metropolis\n" +
-                
"┌──────────────┬─────────────────────┬─────────────┬──────────────┬─────────────────┐\n"
 +
-                "│ Name         │ Type                │ Cardinality │ Value    
    │ Characteristics │\n" +
-                
"├──────────────┼─────────────────────┼─────────────┼──────────────┼─────────────────┤\n"
 +
-                "│ city         │ String              │ 1 ∈ [1 … 1] │ Tokyo    
    │                 │\n" +
-                "│ population   │ Integer             │ 1 ∈ [1 … 1] │ 
13,185,502   │                 │\n" +
-                "│ region       │ InternationalString │ 0 ∉ [1 … 1] │          
    │                 │\n" +
-                "│ isGlobal     │ Boolean             │ 0 ∉ [1 … 1] │          
    │                 │\n" +
-                "│ universities │ String              │ 2 ∈ [0 … ∞] │ Waseda, 
Keio │                 │\n" +
-                "│ temperature  │ Float               │ 1 ∈ [1 … 1] │ NaN      
    │ accuracy, units │\n" +
-                
"└──────────────┴─────────────────────┴─────────────┴──────────────┴─────────────────┘\n",
 text);
+                
"┌──────────────┬─────────────────────┬─────────────┬──────────────┬────────────────────────────┐\n"
 +
+                "│ Name         │ Type                │ Cardinality │ Value    
    │ Characteristics            │\n" +
+                
"├──────────────┼─────────────────────┼─────────────┼──────────────┼────────────────────────────┤\n"
 +
+                "│ city         │ String              │ 1 ∈ [1 … 1] │ Tokyo    
    │                            │\n" +
+                "│ population   │ Integer             │ 1 ∈ [1 … 1] │ 
13,185,502   │                            │\n" +
+                "│ region       │ InternationalString │ 0 ∉ [1 … 1] │          
    │                            │\n" +
+                "│ isGlobal     │ Boolean             │ 0 ∉ [1 … 1] │          
    │                            │\n" +
+                "│ universities │ String              │ 2 ∈ [0 … ∞] │ Waseda, 
Keio │                            │\n" +
+                "│ temperature  │ Float               │ 1 ∈ [1 … 1] │ NaN      
    │ accuracy = 0.1, units = °C │\n" +
+                
"└──────────────┴─────────────────────┴─────────────┴──────────────┴────────────────────────────┘\n",
 text);
     }
 
     /**

Modified: 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/Citations.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -308,14 +308,14 @@ public final class Citations extends Sta
      * <a href="http://www.unidata.ucar.edu/software/netcdf-java";>NetCDF</a> 
specification.
      * The {@linkplain IdentifierSpace#getName() name} of this identifier 
space is fixed to {@code "NetCDF"}.
      * This citation is used as the authority for some map projection method 
and parameter names
-     * as used in NetCDF files.
+     * as used in netCDF files.
      *
      * <div class="note"><b>Example</b>
-     * the Mercator projection can be defined in a NetCDF file with the 
following parameters:
+     * the Mercator projection can be defined in a netCDF file with the 
following parameters:
      *
      * <table class="sis">
-     * <caption>Example of identifiers in NetCDF name space</caption>
-     * <tr><th>Name in NetCDF namespace</th>                           
<th>Name in default namespace (EPSG)</th></tr>
+     * <caption>Example of identifiers in netCDF name space</caption>
+     * <tr><th>Name in netCDF namespace</th>                           
<th>Name in default namespace (EPSG)</th></tr>
      * <tr><td>{@code "NetCDF:semi_major_axis"}</td>                   
<td></td></tr>
      * <tr><td>{@code "NetCDF:semi_minor_axis"}</td>                   
<td></td></tr>
      * <tr><td>{@code "NetCDF:latitude_of_projection_origin"}</td>     
<td>Latitude of natural origin</td></tr>

Modified: 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/citation/DefaultResponsibleParty.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -140,7 +140,7 @@ public class DefaultResponsibleParty ext
 
     /**
      * Returns the name or the position of the first individual. If no 
individual is found in the list of parties,
-     * then this method will search in the list of organization members. The 
later structure is used by our NetCDF
+     * then this method will search in the list of organization members. The 
later structure is used by our netCDF
      * reader.
      *
      * @param  position {@code true} for returning the position name instead 
than individual name.

Modified: 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGCP.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -30,7 +30,7 @@ import org.apache.sis.xml.Namespaces;
 /**
  * Information on ground control point.
  * Ground control points (GCP) are large marked targets on the ground,
- * not to be confused with <cite>localization grid</cite> points embedded in 
some file formats like GeoTIFF or NetCDF.
+ * not to be confused with <cite>localization grid</cite> points embedded in 
some file formats like GeoTIFF or netCDF.
  * The following property is mandatory in a well-formed metadata according ISO 
19115:
  *
  * <div class="preformat">{@code MI_GCP}

Copied: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java
 (from r1809390, 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java)
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java?p2=sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java&p1=sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java&r1=1809390&r2=1809404&rev=1809404&view=diff
==============================================================================
--- 
sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/EPSGFactoryProxy.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -28,7 +28,6 @@ import org.opengis.referencing.crs.Engin
 import org.opengis.referencing.crs.GeocentricCRS;
 import org.opengis.referencing.crs.GeographicCRS;
 import org.opengis.referencing.crs.ImageCRS;
-import org.opengis.referencing.crs.ParametricCRS;
 import org.opengis.referencing.crs.ProjectedCRS;
 import org.opengis.referencing.crs.TemporalCRS;
 import org.opengis.referencing.crs.VerticalCRS;
@@ -137,11 +136,6 @@ public final class EPSGFactoryProxy impl
     }
 
     @Override
-    public ParametricCRS createParametricCRS(String code) throws 
FactoryException {
-        return factory().createParametricCRS(code);
-    }
-
-    @Override
     public Set<String> getAuthorityCodes(Class<? extends IdentifiedObject> 
type) throws FactoryException {
         return factory().getAuthorityCodes(type);
     }

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionDescriptor.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -43,7 +43,7 @@ import org.apache.sis.util.Workaround;
  *       {@code "standard_parallel_1"} and {@code "standard_parallel_2"}</li>
  * </ul>
  *
- * The main purpose of this class is to support transparently the NetCDF ways 
to express some parameter values.
+ * The main purpose of this class is to support transparently the netCDF ways 
to express some parameter values.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.6

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/parameter/MapProjectionParameters.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -164,7 +164,7 @@ final class MapProjectionParameters exte
 
         /**
          * All names known to Apache SIS for the Earth radius parameter.
-         * This is used in some NetCDF files instead of {@code SEMI_MAJOR} and 
{@code SEMI_MINOR}.
+         * This is used in some netCDF files instead of {@code SEMI_MAJOR} and 
{@code SEMI_MINOR}.
          * This is not a standard parameter.
          */
         static final ParameterDescriptor<Double> DESCRIPTOR = new 
DefaultParameterDescriptor<>(
@@ -249,7 +249,7 @@ final class MapProjectionParameters exte
 
         /**
          * All names known to Apache SIS for the inverse flattening parameter.
-         * This is used in some NetCDF files instead of {@code SEMI_MINOR}.
+         * This is used in some netCDF files instead of {@code SEMI_MINOR}.
          * This is not a standard parameter.
          */
         static final ParameterDescriptor<Double> DESCRIPTOR = new 
DefaultParameterDescriptor<>(
@@ -433,7 +433,7 @@ final class MapProjectionParameters exte
 
         /**
          * All names known to Apache SIS for the standard parallels parameter, 
as an array of 1 or 2 elements.
-         * This is used in some NetCDF files instead of {@value 
Constants#STANDARD_PARALLEL_1} and
+         * This is used in some netCDF files instead of {@value 
Constants#STANDARD_PARALLEL_1} and
          * {@value Constants#STANDARD_PARALLEL_2}. This is not a standard 
parameter.
          */
         static final ParameterDescriptor<double[]> DESCRIPTOR = new 
DefaultParameterDescriptor<>(

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/AuthorityFactories.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.referencing;
 
+import java.util.Iterator;
 import java.util.ServiceLoader;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
@@ -30,6 +31,7 @@ import org.apache.sis.internal.util.Lazy
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.SystemListener;
+import org.apache.sis.internal.referencing.EPSGFactoryProxy;
 import org.apache.sis.referencing.factory.MultiAuthoritiesFactory;
 import org.apache.sis.referencing.factory.GeodeticAuthorityFactory;
 import org.apache.sis.referencing.factory.UnavailableFactoryException;
@@ -58,7 +60,8 @@ final class AuthorityFactories<T extends
 
     /**
      * The unique system-wide authority factory instance that contains all 
factories found on the classpath,
-     * plus the EPSG factory.
+     * plus the EPSG factory. The {@link EPSGFactoryProxy} most be excluded 
from this list, since the EPSG
+     * factory is handled in a special way.
      */
     static final MultiAuthoritiesFactory ALL = new MultiAuthoritiesFactory(
             new AuthorityFactories<>(CRSAuthorityFactory.class),
@@ -211,4 +214,18 @@ final class AuthorityFactories<T extends
         EPSG();                         // Force EPSGFactory instantiation if 
not already done.
         return (T[]) EPSG;
     }
+
+    /**
+     * Invoked by {@link LazySet} for fetching the next element from the given 
iterator.
+     * Skips the {@link EPSGFactoryProxy} if possible, or returns {@code null} 
otherwise.
+     * Note that {@link MultiAuthoritiesFactory} is safe to null values.
+     */
+    @Override
+    protected T next(final Iterator<? extends T> it) {
+        T e = it.next();
+        if (e instanceof EPSGFactoryProxy) {
+            e = it.hasNext() ? it.next() : null;
+        }
+        return e;
+    }
 }

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -63,11 +63,11 @@ public class AlbersEqualArea extends Equ
      *
      * <p>In Apache SIS implementation, we use modified formulas in which the 
(1 - ℯ²) factor is omitted in
      * {@link #qm(double)} calculation. Consequently what we get is a modified 
value <var>nm</var> which is
-     * related to Synder's <var>n</var> value by {@literal n = nm / (1 - ℯ²)}. 
 The omitted (1 - ℯ²) factor
+     * related to Snyder's <var>n</var> value by {@literal n = nm / (1 - ℯ²)}. 
 The omitted (1 - ℯ²) factor
      * is either taken in account by the (de)normalization matrix, or cancels 
with other (1 - ℯ²) factors
      * when we develop the formulas.</p>
      *
-     * <p>Note that in the spherical case, <var>nm</var> = Synder's 
<var>n</var>.</p>
+     * <p>Note that in the spherical case, <var>nm</var> = Snyder's 
<var>n</var>.</p>
      */
     final double nm;
 
@@ -136,7 +136,7 @@ public class AlbersEqualArea extends Equ
         }
         C = m1*m1 + nm*α1;                  // Omitted (1-ℯ²) term in nm 
cancels with omitted (1-ℯ²) term in α₁.
         /*
-         * Compute rn = (1-ℯ²)/nm, which is the reciprocal of the "real" n 
used in Synder and EPSG guidance note.
+         * Compute rn = (1-ℯ²)/nm, which is the reciprocal of the "real" n 
used in Snyder and EPSG guidance note.
          * We opportunistically use double-double arithmetic since the 
MatrixSIS operations use them anyway, but
          * we do not really have that accuracy because of the limited 
precision of 'nm'. The intend is rather to
          * increase the chances term cancellations happen during concatenation 
of coordinate operations.
@@ -260,14 +260,14 @@ public class AlbersEqualArea extends Equ
         final double x = srcPts[srcOff  ];
         final double y = srcPts[srcOff+1];
         /*
-         * Note: Synder suggests to reverse the sign of x, y and ρ₀ if n is 
negative. It should not done in Apache SIS
+         * Note: Snyder suggests to reverse the sign of x, y and ρ₀ if n is 
negative. It should not done in Apache SIS
          * implementation because (x,y) are premultiplied by n (by the 
normalization affine transform) before to enter
          * in this method, so if n was negative those values have already 
their sign reverted.
          */
         dstPts[dstOff  ] = atan2(x, y);
         dstPts[dstOff+1] = φ((C - (x*x + y*y)) / nm);
         /*
-         * Note: Synder 14-19 gives  q = (C - ρ²n²/a²)/n  where  ρ = √(x² + 
(ρ₀ - y)²).
+         * Note: Snyder 14-19 gives  q = (C - ρ²n²/a²)/n  where  ρ = √(x² + 
(ρ₀ - y)²).
          * But in Apache SIS implementation, ρ₀ has already been subtracted by 
the matrix before we reach this point.
          * So we can simplify by ρ² = x² + y². Furthermore the matrix also 
divided x and y by a (the semi-major axis
          * length) before this method, and multiplied by n. so what we have is 
actually (ρ⋅n/a)² = x² + y².
@@ -318,10 +318,10 @@ public class AlbersEqualArea extends Equ
             final double cosθ = cos(θ);
             final double sinθ = sin(θ);
             final double sinφ = sin(φ);
-            final double ρ = sqrt(C - 2*nm*sinφ);           // Synder 14-3 
with radius and division by n omitted.
+            final double ρ = sqrt(C - 2*nm*sinφ);           // Snyder 14-3 
with radius and division by n omitted.
             if (dstPts != null) {
-                dstPts[dstOff  ] = ρ * sinθ;                // Synder 14-1
-                dstPts[dstOff+1] = ρ * cosθ;                // Synder 14-2
+                dstPts[dstOff  ] = ρ * sinθ;                // Snyder 14-1
+                dstPts[dstOff+1] = ρ * cosθ;                // Snyder 14-2
             }
             if (!derivate) {
                 return null;
@@ -341,8 +341,8 @@ public class AlbersEqualArea extends Equ
         {
             final double x = srcPts[srcOff];
             final double y = srcPts[srcOff + 1];
-            dstPts[dstOff  ] = atan2(x, y);                         // Part of 
Synder 14-11
-            dstPts[dstOff+1] = asin((C - (x*x + y*y)) / (nm*2));    // Synder 
14-8 modified
+            dstPts[dstOff  ] = atan2(x, y);                         // Part of 
Snyder 14-11
+            dstPts[dstOff+1] = asin((C - (x*x + y*y)) / (nm*2));    // Snyder 
14-8 modified
         }
     }
 }

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -248,7 +248,7 @@ public class CylindricalEqualArea extend
             dstOff--;
             while (--numPts >= 0) {
                 final double φ = dstPts[dstOff += DIMENSION];           // 
Same as srcPts[srcOff + 1].
-                dstPts[dstOff] = qm_ellipsoid(sin(φ));                  // 
Part of Synder equation (10-15)
+                dstPts[dstOff] = qm_ellipsoid(sin(φ));                  // 
Part of Snyder equation (10-15)
             }
         }
     }
@@ -268,7 +268,7 @@ public class CylindricalEqualArea extend
         dstPts[dstOff  ] = srcPts[srcOff  ];            // Must be before 
writing y.
         dstPts[dstOff+1] = φ(y);
         /*
-         * Equation 10-26 of Synder gives β = asin(2y⋅k₀/(a⋅qPolar)).
+         * Equation 10-26 of Snyder gives β = asin(2y⋅k₀/(a⋅qPolar)).
          * In our case it simplifies to sinβ = (y/qmPolar) because:
          *
          *   - y is already multiplied by 2k₀/a because of the denormalization 
matrix

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/EqualAreaProjection.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -39,7 +39,7 @@ abstract class EqualAreaProjection exten
     private static final long serialVersionUID = -6175270149094989517L;
 
     /**
-     * {@code false} for using the original formulas as published by Synder, 
or {@code true} for using formulas
+     * {@code false} for using the original formulas as published by Snyder, 
or {@code true} for using formulas
      * modified using trigonometric identities. The use of trigonometric 
identities is for reducing the amount
      * of calls to the {@link Math#sin(double)} and similar methods. Some 
identities used are:
      *
@@ -193,7 +193,7 @@ abstract class EqualAreaProjection exten
     }
 
     /**
-     * Computes the latitude using equation 3-18 from Synder, followed by 
iterative resolution of Synder 3-16.
+     * Computes the latitude using equation 3-18 from Snyder, followed by 
iterative resolution of Snyder 3-16.
      * In theory, the series expansion given by equation 3-18 (φ ≈ c₂⋅sin(2β) 
+ c₄⋅sin(4β) + c₈⋅sin(8β)) should
      * be used in replacement of the iterative method. However in practice the 
series expansion seems to not
      * have a sufficient amount of terms for achieving the centimetric 
precision, so we "finish" it by the
@@ -210,7 +210,7 @@ abstract class EqualAreaProjection exten
             φ = ci8 * sin(8*β)
               + ci4 * sin(4*β)
               + ci2 * sin(2*β)
-              + β;                                                             
     // Synder 3-18
+              + β;                                                             
     // Snyder 3-18
         } else {
             /*
              * Same formula than above, but rewriten using trigonometric 
identities in order to avoid
@@ -233,11 +233,11 @@ abstract class EqualAreaProjection exten
          * Use the iterative method for reaching the last part of missing 
accuracy. Usually this loop
          * will perform exactly one iteration, no more, because φ is already 
quite close to the result.
          *
-         * Mathematical note: Synder 3-16 gives q/(1-ℯ²) instead of y in the 
calculation of Δφ below.
-         * For Cylindrical Equal Area projection, Synder 10-17 gives  q = 
(qPolar⋅sinβ), which simplifies
+         * Mathematical note: Snyder 3-16 gives q/(1-ℯ²) instead of y in the 
calculation of Δφ below.
+         * For Cylindrical Equal Area projection, Snyder 10-17 gives  q = 
(qPolar⋅sinβ), which simplifies
          * as y.
          *
-         * For Albers Equal Area projection, Synder 14-19 gives  q = (C - 
ρ²n²/a²)/n,  which we rewrite
+         * For Albers Equal Area projection, Snyder 14-19 gives  q = (C - 
ρ²n²/a²)/n,  which we rewrite
          * as  q = (C - ρ²)/n  (see comment in 
AlbersEqualArea.inverseTransform(…) for the mathematic).
          * The y value given to this method is y = (C - ρ²) / (n⋅(1-ℯ²)) = 
q/(1-ℯ²), the desired value.
          */
@@ -253,7 +253,7 @@ abstract class EqualAreaProjection exten
             }
         }
         /*
-         * In the Albers Equal Area discussion, Synder said that above 
algorithm does not converge if
+         * In the Albers Equal Area discussion, Snyder said that above 
algorithm does not converge if
          *
          *   q = ±(1 - (1-ℯ²)/(2ℯ) ⋅ ln((1-ℯ)/(1+ℯ)))
          *
@@ -265,9 +265,9 @@ abstract class EqualAreaProjection exten
          *
          *   y  =  ±(1/(1-ℯ²) + atanh(ℯ)/ℯ)  =  ±qmPolar
          *
-         * which implies  sinβ = ±1. This is consistent with Synder discussion 
of Cylndrical Equal Area
+         * which implies  sinβ = ±1. This is consistent with Snyder discussion 
of Cylndrical Equal Area
          * projection, where he said exactly that about the same formula (that 
it does not converge for
-         * β = ±90°). In both case, Synder said that the result is φ = β, with 
the same sign.
+         * β = ±90°). In both case, Snyder said that the result is φ = β, with 
the same sign.
          */
         final double as = abs(sinβ);
         if (abs(as - 1) < ANGULAR_TOLERANCE) {

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -410,7 +410,7 @@ public class ObliqueStereographic extend
              * Formulas below are the same than the elliptical formulas after 
the geodetic coordinates
              * have been converted to conformal coordinates.  In this 
spherical case we do not need to
              * perform such conversion. Instead we have directly   χ = φ  and  
Λ = λ.   The simplified
-             * EPSG formulas then become the same than Synder formulas for the 
spherical case.
+             * EPSG formulas then become the same than Snyder formulas for the 
spherical case.
              */
             final double sinφ      = sin(φ);
             final double cosφ      = cos(φ);
@@ -419,10 +419,10 @@ public class ObliqueStereographic extend
             final double sinφsinφ0 = sinφ * sinχ0;
             final double cosφcosφ0 = cosφ * cosχ0;
             final double cosφsinλ  = cosφ * sinλ;
-            final double B = 1 + sinφsinφ0 + cosφcosφ0*cosλ;                   
 // Synder 21-4
+            final double B = 1 + sinφsinφ0 + cosφcosφ0*cosλ;                   
 // Snyder 21-4
             if (dstPts != null) {
-                dstPts[dstOff  ] = cosφsinλ / B;                               
 // Synder 21-2
-                dstPts[dstOff+1] = (sinφ*cosχ0 - cosφ*sinχ0*cosλ) / B;         
 // Synder 21-3
+                dstPts[dstOff  ] = cosφsinλ / B;                               
 // Snyder 21-2
+                dstPts[dstOff+1] = (sinφ*cosχ0 - cosφ*sinχ0*cosλ) / B;         
 // Snyder 21-3
             }
             if (!derivate) {
                 return null;

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -197,7 +197,7 @@ public class PolarStereographic extends
         if (abs(φ1 + PI/2) < ANGULAR_TOLERANCE) {
             /*
              * Polar Stereographic (variant A)
-             * True scale at pole (part of Synder 21-33). From EPSG guide 
(April 2015) §1.3.7.2:
+             * True scale at pole (part of Snyder 21-33). From EPSG guide 
(April 2015) §1.3.7.2:
              *
              *    ρ = 2⋅a⋅k₀⋅t / √[(1+ℯ)^(1+ℯ) ⋅ (1–ℯ)^(1–ℯ)]
              *
@@ -212,7 +212,7 @@ public class PolarStereographic extends
         } else {
             /*
              * Polar Stereographic (variant B or C)
-             * Derived from Synder 21-32 and 21-33. From EPSG guide (April 
2015) §1.3.7.2:
+             * Derived from Snyder 21-32 and 21-33. From EPSG guide (April 
2015) §1.3.7.2:
              *
              *   tF = tan(π/4 + φ1/2) / {[(1 + ℯ⋅sinφ1) / (1 – ℯ⋅sinφ1)]^(ℯ/2)}
              *   mF = cosφ1 / √[1 – ℯ²⋅sin²φ1]
@@ -225,7 +225,7 @@ public class PolarStereographic extends
              *   ρ  = mF / tF
              *   k₀ = ρ⋅√[…]/2  but we do not need that value.
              *
-             * In the spherical case, should give ρ = 1 + sinφ1   (Synder 21-7 
and 21-11).
+             * In the spherical case, should give ρ = 1 + sinφ1   (Snyder 21-7 
and 21-11).
              */
             final double sinφ1 = sin(φ1);
             final double mF = initializer.scaleAtφ(sinφ1, cos(φ1));
@@ -378,8 +378,8 @@ public class PolarStereographic extends
             final double sinθ = sin(θ);
             final double cosθ = cos(θ);
             final double t    = tan(PI/4 + 0.5*φ);
-            final double x    = t * sinθ;               // Synder 21-5
-            final double y    = t * cosθ;               // Synder 21-6
+            final double x    = t * sinθ;               // Snyder 21-5
+            final double y    = t * cosθ;               // Snyder 21-6
             if (dstPts != null) {
                 dstPts[dstOff  ] = x;
                 dstPts[dstOff+1] = y;

Modified: 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -131,7 +131,7 @@ import org.apache.sis.internal.jdk8.JDK8
  * </ul>
  *
  * <p>The main purpose of those dynamic parameters is to support some less 
commonly used conventions
- * without duplicating the most commonly used conventions. The alternative 
ways are used in NetCDF
+ * without duplicating the most commonly used conventions. The alternative 
ways are used in netCDF
  * files for example, which often use spherical models instead than 
ellipsoidal ones.</p>
  *
  *

Modified: 
sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -1,2 +1,3 @@
 # Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license agreements.
+org.apache.sis.internal.referencing.EPSGFactoryProxy
 org.apache.sis.referencing.factory.CommonAuthorityFactory

Modified: 
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AuthorityFactoriesTest.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AuthorityFactoriesTest.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AuthorityFactoriesTest.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/AuthorityFactoriesTest.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -17,6 +17,7 @@
 package org.apache.sis.referencing;
 
 import java.util.Collection;
+import java.util.ServiceLoader;
 import org.opengis.util.FactoryException;
 import org.opengis.referencing.NoSuchAuthorityCodeException;
 import org.opengis.referencing.IdentifiedObject;
@@ -26,7 +27,9 @@ import org.opengis.referencing.crs.Geogr
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.util.Constants;
+import org.apache.sis.internal.referencing.EPSGFactoryProxy;
 import org.apache.sis.referencing.crs.HardCodedCRS;
+import org.apache.sis.referencing.factory.CommonAuthorityFactory;
 import org.apache.sis.referencing.factory.IdentifiedObjectFinder;
 import org.apache.sis.referencing.factory.NoSuchAuthorityFactoryException;
 
@@ -66,6 +69,28 @@ public final strictfp class AuthorityFac
     }
 
     /**
+     * Ensures that {@link EPSGFactoryProxy} is declared before {@link 
CommonAuthorityFactory}.
+     * This is preferable (but not mandatory) because of the way we 
implemented {@link AuthorityFactories}.
+     */
+    @Test
+    public void testFactoryOrder() {
+        boolean foundProxy  = false;
+        boolean foundCommon = false;
+        for (CRSAuthorityFactory factory : 
ServiceLoader.load(CRSAuthorityFactory.class, 
AuthorityFactories.class.getClassLoader())) {
+            if (factory instanceof CommonAuthorityFactory) {
+                foundCommon = true;
+                assertTrue("Should not have found EPSGFactoryProxy after 
CommonAuthorityFactory.", foundProxy);
+            }
+            if (factory instanceof EPSGFactoryProxy) {
+                foundProxy = true;
+                assertFalse("Should not have found EPSGFactoryProxy after 
CommonAuthorityFactory.", foundCommon);
+            }
+        }
+        assertTrue("Factory not found.", foundCommon);
+        assertTrue("Factory not found.", foundProxy);
+    }
+
+    /**
      * Tests {@link CRSAuthorityFactory#getDescriptionText(String)}.
      *
      * @throws FactoryException if the EPSG:4326 name can not be obtained.

Modified: 
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/AlbersEqualAreaTest.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -61,12 +61,12 @@ public final strictfp class AlbersEqualA
     @Test
     public void testSphere() throws FactoryException, TransformException {
         createCompleteProjection(new 
org.apache.sis.internal.referencing.provider.AlbersEqualArea(),
-                6370997,    // Semi-major axis from Synder table 15
+                6370997,    // Semi-major axis from Snyder table 15
                 6370997,    // Semi-minor axis
                 0,          // Central meridian
                 0,          // Latitude of origin
-                29.5,       // Standard parallel 1 (from Synder table 15)
-                45.5,       // Standard parallel 2 (from Synder table 15)
+                29.5,       // Standard parallel 1 (from Snyder table 15)
+                45.5,       // Standard parallel 2 (from Snyder table 15)
                 NaN,        // Scale factor (none)
                 0,          // False easting
                 0);         // False northing
@@ -76,10 +76,10 @@ public final strictfp class AlbersEqualA
         tolerance = Formulas.LINEAR_TOLERANCE;
         final AlbersEqualArea kernel = (AlbersEqualArea) getKernel();
         assertTrue("isSpherical", isSpherical(kernel));
-        assertEquals("n", 0.6028370, kernel.nm, 0.5E-7);                    // 
Expected 'n' value from Synder table 15.
+        assertEquals("n", 0.6028370, kernel.nm, 0.5E-7);                    // 
Expected 'n' value from Snyder table 15.
         /*
          * When stepping into the AlbersEqualArea.Sphere.transform(…) method 
with a debugger, the
-         * expected value of 6370997*ρ/n is 6910941 (value taken from ρ column 
in Synder table 15).
+         * expected value of 6370997*ρ/n is 6910941 (value taken from ρ column 
in Snyder table 15).
          */
         verifyTransform(new double[] {0, 50}, new double[] {0, 5373933.180});
         /*
@@ -109,12 +109,12 @@ public final strictfp class AlbersEqualA
     @DependsOnMethod("testSphere")
     public void testEllipse() throws FactoryException, TransformException {
         createCompleteProjection(new 
org.apache.sis.internal.referencing.provider.AlbersEqualArea(),
-                6378206.4,  // Semi-major axis from Synder table 15
+                6378206.4,  // Semi-major axis from Snyder table 15
                 6356583.8,  // Semi-minor axis
                 0,          // Central meridian
                 0,          // Latitude of origin
-                29.5,       // Standard parallel 1 (from Synder table 15)
-                45.5,       // Standard parallel 2 (from Synder table 15)
+                29.5,       // Standard parallel 1 (from Snyder table 15)
+                45.5,       // Standard parallel 2 (from Snyder table 15)
                 NaN,        // Scale factor (none)
                 0,          // False easting
                 0);         // False northing
@@ -125,13 +125,13 @@ public final strictfp class AlbersEqualA
         final AlbersEqualArea kernel = (AlbersEqualArea) getKernel();
         assertFalse("isSpherical", isSpherical(kernel));
         /*
-         * Expected 'n' value from Synder table 15. The division by (1-ℯ²) is 
because Apache SIS omits this factor
+         * Expected 'n' value from Snyder table 15. The division by (1-ℯ²) is 
because Apache SIS omits this factor
          * in its calculation of n (we rather take it in account in 
(de)normalization matrices and elsewhere).
          */
         assertEquals("n", 0.6029035, kernel.nm / (1 - 
kernel.eccentricitySquared), 0.5E-7);
         /*
          * When stepping into the AlbersEqualArea.Sphere.transform(…) method 
with a debugger, the expected
-         * value of 6378206.4*ρ/(nm/(1-ℯ²)) is 6931335 (value taken from ρ 
column in Synder table 15).
+         * value of 6378206.4*ρ/(nm/(1-ℯ²)) is 6931335 (value taken from ρ 
column in Snyder table 15).
          */
         verifyTransform(new double[] {0, 50}, new double[] {0, 5356698.435});
         /*

Modified: 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/Constants.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -107,7 +107,7 @@ public final class Constants extends Sta
     public static final byte CRS1 = 1;
 
     /**
-     * The NetCDF parameter name for the Earth radius.
+     * The netCDF parameter name for the Earth radius.
      */
     public static final String EARTH_RADIUS = "earth_radius";
 
@@ -118,7 +118,7 @@ public final class Constants extends Sta
                                SEMI_MINOR = "semi_minor";
 
     /**
-     * The NetCDF parameter name for inverse flattening, and whether that 
parameter is definitive.
+     * The netCDF parameter name for inverse flattening, and whether that 
parameter is definitive.
      * The later is specific to SIS.
      */
     public static final String INVERSE_FLATTENING = "inverse_flattening",
@@ -135,7 +135,7 @@ public final class Constants extends Sta
     public static final String LATITUDE_OF_ORIGIN = "latitude_of_origin";
 
     /**
-     * The NetCDF parameter name for the standard parallels.
+     * The netCDF parameter name for the standard parallels.
      */
     public static final String STANDARD_PARALLEL = "standard_parallel";
 

Modified: 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/internal/util/LazySet.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -184,7 +184,7 @@ public class LazySet<E> extends SetOfUnk
     public final int size() {
         if (canPullMore()) {
             while (sourceIterator.hasNext()) {
-                cache(sourceIterator.next());
+                cache(next(sourceIterator));
             }
             sourceIterator = null;
         }
@@ -192,6 +192,19 @@ public class LazySet<E> extends SetOfUnk
     }
 
     /**
+     * Returns the next element from the given iterator. Default 
implementation returns {@link Iterator#next()}.
+     * Subclasses may override if they need to apply additional processing. 
For example this method can be used
+     * for skipping data, but this approach works only if we have the 
guarantee that another element exists after
+     * the skipped one (because {@code LazySet} will not invoke {@link 
Iterator#hasNext()} again).
+     *
+     * @param  it  the iterator from which to get a next value.
+     * @return the next value (may be {@code null}).
+     */
+    protected E next(final Iterator<? extends E> it) {
+        return it.next();
+    }
+
+    /**
      * Caches a new element. Subclasses can override this method is they want 
to substitute the given value
      * by another value.
      *
@@ -238,7 +251,7 @@ public class LazySet<E> extends SetOfUnk
         assert index <= numCached : index;
         if (index >= numCached) {
             if (canPullMore()) {
-                cache(sourceIterator.next());
+                cache(next(sourceIterator));
             } else {
                 throw new NoSuchElementException();
             }

Modified: 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java 
[UTF-8] (original)
+++ 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/UnitFormat.java 
[UTF-8] Sat Sep 23 11:47:20 2017
@@ -58,11 +58,11 @@ import org.apache.sis.util.iso.DefaultNa
  * then {@code "####"} is parsed as an integer and forwarded to the {@link 
Units#valueOfEPSG(int)} method.
  *
  * <div class="section">NetCDF unit symbols</div>
- * The attributes in NetCDF files often merge the axis direction with the 
angular unit,
+ * The attributes in netCDF files often merge the axis direction with the 
angular unit,
  * as in {@code "degrees_east"}, {@code "degrees_north"} or {@code "Degrees 
North"}.
  * This class ignores those suffixes and unconditionally returns {@link 
Units#DEGREE} for all axis directions.
  * In particular, the units for {@code "degrees_west"} and {@code 
"degrees_east"} do <strong>not</strong> have
- * opposite sign. It is caller responsibility to handle the direction of axes 
associated to NetCDF units.
+ * opposite sign. It is caller responsibility to handle the direction of axes 
associated to netCDF units.
  *
  * <div class="section">Multi-threading</div>
  * {@code UnitFormat} is generally not thread-safe.

Modified: 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java 
[UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/measure/Units.java 
[UTF-8] Sat Sep 23 11:47:20 2017
@@ -1624,12 +1624,12 @@ public final class Units extends Static
      * is parsed as an integer and forwarded to the {@link #valueOfEPSG(int)} 
method.
      *
      * <div class="section">NetCDF unit symbols</div>
-     * The attributes in NetCDF files often merge the axis direction with the 
angular unit,
+     * The attributes in netCDF files often merge the axis direction with the 
angular unit,
      * as in {@code "degrees_east"} or {@code "degrees_north"}. This {@code 
valueOf} method
      * ignores those suffixes and unconditionally returns {@link #DEGREE} for 
all axis directions.
      * In particular, the units for {@code "degrees_west"} and {@code 
"degrees_east"}
      * do <strong>not</strong> have opposite sign.
-     * It is caller responsibility to handle the direction of axes associated 
to NetCDF units.
+     * It is caller responsibility to handle the direction of axes associated 
to netCDF units.
      *
      * @param  uom  the symbol to parse, or {@code null}.
      * @return the parsed symbol, or {@code null} if {@code uom} was null.

Modified: 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java 
[UTF-8] (original)
+++ 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java 
[UTF-8] Sat Sep 23 11:47:20 2017
@@ -36,7 +36,7 @@ import org.apache.sis.internal.system.Mo
  * ({@link org.apache.sis.storage.DataStore}, <i>etc</i>).
  * {@code OptionKey}s are used for aspects that usually do not need to be 
configured, except in a few specialized cases.
  * For example most data file formats read by SIS do not require the user to 
specify the character encoding, since the
- * encoding it is often given in the file header or in the format 
specification. However if SIS may have to read plain
+ * encoding it is often given in the file header or in the format 
specification. However if SIS needs to read plain
  * text files <em>and</em> the default platform encoding is not suitable, then 
the user can specify the desired encoding
  * explicitely using the {@link #ENCODING} option.
  *
@@ -77,8 +77,8 @@ public class OptionKey<T> implements Ser
     /**
      * The library to use for creating geometric objects at reading time.
      * Some libraries are the Java Topology Suite (JTS), ESRI geometry API and 
Java2D.
-     * If this option is not specified, then a library will be selected 
automatically
-     * among the libraries available in the runtime environment.
+     * If this option is not specified, then a default library will be 
selected among
+     * the libraries available in the runtime environment.
      *
      * @since 0.8
      */

Modified: 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java 
[UTF-8] (original)
+++ 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java 
[UTF-8] Sat Sep 23 11:47:20 2017
@@ -1200,7 +1200,7 @@ searchWordBreak:    while (true) {
      *
      *   <li>Next replace all occurrence of {@code '_'} by spaces in order to 
take in account
      *     an other common naming convention, which uses {@code '_'} as a word 
separator. This
-     *     convention is used by NetCDF attributes like {@code 
"project_name"}.</li>
+     *     convention is used by netCDF attributes like {@code 
"project_name"}.</li>
      *
      *   <li>Finally ensure that the first character is upper-case.</li>
      * </ol>

Modified: 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java 
[UTF-8] (original)
+++ 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Exceptions.java 
[UTF-8] Sat Sep 23 11:47:20 2017
@@ -20,6 +20,7 @@ import java.util.List;
 import java.util.ArrayList;
 import java.util.Locale;
 import java.sql.SQLException;
+import java.nio.file.DirectoryIteratorException;
 import java.lang.reflect.InvocationTargetException;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.resources.Vocabulary;
@@ -211,6 +212,7 @@ public final class Exceptions extends St
      *   <li>It is an instance of {@link InvocationTargetException} (could be 
wrapping anything).</li>
      *   <li>It is an instance of {@link BackingStoreException} (typically 
wrapping a checked exception).</li>
      *   <li>It is an instance of {@link UncheckedIOException} (wrapping a 
{@link java.io.IOException}).</li>
+     *   <li>It is an instance of {@link DirectoryIteratorException} (wrapping 
a {@link java.io.IOException}).</li>
      *   <li>It is a parent type of the cause. For example some JDBC drivers 
wrap {@link SQLException}
      *       in other {@code SQLException} without additional information.</li>
      * </ul>
@@ -227,7 +229,8 @@ public final class Exceptions extends St
         if (exception != null) {
             while (exception instanceof InvocationTargetException ||
                    exception instanceof BackingStoreException ||
-                   exception instanceof UncheckedIOException)
+                   exception instanceof UncheckedIOException ||
+                   exception instanceof DirectoryIteratorException)
             {
                 final Throwable cause = exception.getCause();
                 if (!(cause instanceof Exception)) break;

Modified: 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: 
http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1809404&r1=1809403&r2=1809404&view=diff
==============================================================================
--- 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
 [UTF-8] (original)
+++ 
sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
 [UTF-8] Sat Sep 23 11:47:20 2017
@@ -360,7 +360,7 @@ public final class Logging extends Stati
         }
         /*
          * Now prepare the log message. If we have been unable to figure out a 
source class and
-         * method name, we will fallback on JDK logging default mechanism, 
which may returns a
+         * method name, we will fallback on JDK logging default mechanism, 
which may return a
          * less relevant name than our attempt to use the logger name as the 
package name.
          *
          * The message is fetched using Exception.getMessage() instead than 
getLocalizedMessage()


Reply via email to