You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2018/12/04 20:13:32 UTC

[sis] branch geoapi-4.0 updated (214e2c3 -> 66a0c87)

This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a change to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git.


    from 214e2c3  Port more tests and update documentation (replace "geophysics values" by "real values").
     new ae6fb90  Typo: replaced "approximative" by "approximated", "approximation" or "rough".
     new 66a0c87  Add more tests.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/sis/test/suite/ConsoleTestSuite.java    |   2 +-
 .../org/apache/sis/openoffice/Transformer.java     |   2 +-
 .../apache/sis/test/suite/OpenOfficeTestSuite.java |   2 +-
 .../java/org/apache/sis/feature/FeatureFormat.java |   2 +-
 .../apache/sis/test/suite/FeatureTestSuite.java    |   2 +-
 .../main/java/org/apache/sis/io/wkt/Formatter.java |   2 +-
 .../iso/extent/DefaultGeographicBoundingBox.java   |   6 +-
 .../apache/sis/metadata/iso/extent/Extents.java    |   6 +-
 .../java/org/apache/sis/xml/MarshallerPool.java    |   2 +-
 .../sis/metadata/iso/extent/ExtentsTest.java       |   2 +-
 .../apache/sis/test/suite/MetadataTestSuite.java   |   2 +-
 .../java/org/apache/sis/coverage/Category.java     |   8 +-
 .../java/org/apache/sis/coverage/CategoryList.java |   2 +-
 .../org/apache/sis/coverage/SampleDimension.java   | 120 +++++++++++++++------
 .../org/apache/sis/internal/raster/Resources.java  |  10 ++
 .../sis/internal/raster/Resources.properties       |   2 +
 .../sis/internal/raster/Resources_fr.properties    |   2 +
 .../apache/sis/coverage/SampleDimensionTest.java   |  73 +++++++++++++
 .../org/apache/sis/test/suite/RasterTestSuite.java |   5 +-
 .../gazetteer/MilitaryGridReferenceSystem.java     |   4 +-
 .../suite/ReferencingByIdentifiersTestSuite.java   |   2 +-
 .../java/org/apache/sis/geometry/Envelopes.java    |   4 +-
 .../java/org/apache/sis/geometry/Shapes2D.java     |   4 +-
 .../referencing/PositionalAccuracyConstant.java    |   2 +-
 .../main/java/org/apache/sis/referencing/CRS.java  |   2 +-
 .../java/org/apache/sis/referencing/CommonCRS.java |  12 +--
 .../sis/referencing/cs/CoordinateSystems.java      |   2 +-
 .../cs/DefaultCoordinateSystemAxis.java            |   2 +-
 .../sis/referencing/datum/DefaultEllipsoid.java    |   2 +-
 .../referencing/factory/sql/EPSGDataAccess.java    |   2 +-
 .../operation/CoordinateOperationRegistry.java     |   4 +-
 .../operation/DefaultOperationMethod.java          |   2 +-
 .../transform/AbstractLinearTransform.java         |   2 +-
 .../transform/InterpolatedGeocentricTransform.java |   2 +-
 .../sis/parameter/MapProjectionParametersTest.java |   2 +-
 .../operation/projection/Benchmark.java            |   2 +-
 .../transform/AbridgedMolodenskyTransformTest.java |   4 +-
 .../operation/transform/MathTransformTestCase.java |   2 +-
 .../sis/test/suite/ReferencingTestSuite.java       |   2 +-
 .../sis/internal/util/StandardDateFormat.java      |   2 +-
 .../java/org/apache/sis/internal/util/X364.java    |   3 +-
 .../org/apache/sis/measure/MeasurementRange.java   |  18 ++++
 .../main/java/org/apache/sis/measure/Range.java    |  19 +++-
 .../main/java/org/apache/sis/measure/Salinity.java |   2 +-
 .../apache/sis/util/logging/MonolineFormatter.java |   2 +-
 .../apache/sis/test/suite/UtilityTestSuite.java    |   2 +-
 ide-project/NetBeans/nbproject/genfiles.properties |   2 +-
 ide-project/NetBeans/nbproject/project.xml         |   3 +
 .../sis/test/suite/FrenchProfileTestSuite.java     |   2 +-
 .../doc-files/LandsatMetadata.html                 |   8 +-
 .../sis/test/suite/EarthObservationTestSuite.java  |   2 +-
 .../org/apache/sis/test/suite/GDALTestSuite.java   |   2 +-
 .../apache/sis/test/suite/GeoTiffTestSuite.java    |   2 +-
 .../org/apache/sis/test/suite/NetcdfTestSuite.java |   2 +-
 .../apache/sis/test/suite/ShapefileTestSuite.java  |   2 +-
 .../org/apache/sis/test/suite/SQLTestSuite.java    |   2 +-
 .../apache/sis/test/suite/StorageTestSuite.java    |   2 +-
 .../org/apache/sis/test/suite/GPXTestSuite.java    |   2 +-
 58 files changed, 287 insertions(+), 104 deletions(-)
 create mode 100644 core/sis-raster/src/test/java/org/apache/sis/coverage/SampleDimensionTest.java


[sis] 01/02: Typo: replaced "approximative" by "approximated", "approximation" or "rough".

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit ae6fb9038c51b8ae077da973ec022026d22cdf06
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Tue Dec 4 16:38:29 2018 +0100

    Typo: replaced "approximative" by "approximated", "approximation" or "rough".
---
 .../java/org/apache/sis/test/suite/ConsoleTestSuite.java     |  2 +-
 .../src/main/java/org/apache/sis/openoffice/Transformer.java |  2 +-
 .../java/org/apache/sis/test/suite/OpenOfficeTestSuite.java  |  2 +-
 .../src/main/java/org/apache/sis/feature/FeatureFormat.java  |  2 +-
 .../java/org/apache/sis/test/suite/FeatureTestSuite.java     |  2 +-
 .../src/main/java/org/apache/sis/io/wkt/Formatter.java       |  2 +-
 .../metadata/iso/extent/DefaultGeographicBoundingBox.java    |  6 +++---
 .../java/org/apache/sis/metadata/iso/extent/Extents.java     |  6 +++---
 .../src/main/java/org/apache/sis/xml/MarshallerPool.java     |  2 +-
 .../java/org/apache/sis/metadata/iso/extent/ExtentsTest.java |  2 +-
 .../java/org/apache/sis/test/suite/MetadataTestSuite.java    |  2 +-
 .../test/java/org/apache/sis/test/suite/RasterTestSuite.java |  2 +-
 .../referencing/gazetteer/MilitaryGridReferenceSystem.java   |  4 ++--
 .../sis/test/suite/ReferencingByIdentifiersTestSuite.java    |  2 +-
 .../src/main/java/org/apache/sis/geometry/Envelopes.java     |  4 ++--
 .../src/main/java/org/apache/sis/geometry/Shapes2D.java      |  4 ++--
 .../sis/internal/referencing/PositionalAccuracyConstant.java |  2 +-
 .../src/main/java/org/apache/sis/referencing/CRS.java        |  2 +-
 .../src/main/java/org/apache/sis/referencing/CommonCRS.java  | 12 ++++++------
 .../org/apache/sis/referencing/cs/CoordinateSystems.java     |  2 +-
 .../sis/referencing/cs/DefaultCoordinateSystemAxis.java      |  2 +-
 .../org/apache/sis/referencing/datum/DefaultEllipsoid.java   |  2 +-
 .../apache/sis/referencing/factory/sql/EPSGDataAccess.java   |  2 +-
 .../referencing/operation/CoordinateOperationRegistry.java   |  4 ++--
 .../sis/referencing/operation/DefaultOperationMethod.java    |  2 +-
 .../operation/transform/AbstractLinearTransform.java         |  2 +-
 .../operation/transform/InterpolatedGeocentricTransform.java |  2 +-
 .../apache/sis/parameter/MapProjectionParametersTest.java    |  2 +-
 .../sis/referencing/operation/projection/Benchmark.java      |  2 +-
 .../operation/transform/AbridgedMolodenskyTransformTest.java |  4 ++--
 .../operation/transform/MathTransformTestCase.java           |  2 +-
 .../java/org/apache/sis/test/suite/ReferencingTestSuite.java |  2 +-
 .../org/apache/sis/internal/util/StandardDateFormat.java     |  2 +-
 .../src/main/java/org/apache/sis/internal/util/X364.java     |  3 +--
 .../src/main/java/org/apache/sis/measure/Salinity.java       |  2 +-
 .../java/org/apache/sis/util/logging/MonolineFormatter.java  |  2 +-
 .../java/org/apache/sis/test/suite/UtilityTestSuite.java     |  2 +-
 ide-project/NetBeans/nbproject/genfiles.properties           |  2 +-
 ide-project/NetBeans/nbproject/project.xml                   |  3 +++
 .../org/apache/sis/test/suite/FrenchProfileTestSuite.java    |  2 +-
 .../storage/earthobservation/doc-files/LandsatMetadata.html  |  8 ++++----
 .../org/apache/sis/test/suite/EarthObservationTestSuite.java |  2 +-
 .../test/java/org/apache/sis/test/suite/GDALTestSuite.java   |  2 +-
 .../java/org/apache/sis/test/suite/GeoTiffTestSuite.java     |  2 +-
 .../test/java/org/apache/sis/test/suite/NetcdfTestSuite.java |  2 +-
 .../java/org/apache/sis/test/suite/ShapefileTestSuite.java   |  2 +-
 .../test/java/org/apache/sis/test/suite/SQLTestSuite.java    |  2 +-
 .../java/org/apache/sis/test/suite/StorageTestSuite.java     |  2 +-
 .../test/java/org/apache/sis/test/suite/GPXTestSuite.java    |  2 +-
 49 files changed, 68 insertions(+), 66 deletions(-)

diff --git a/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java b/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
index e43a197..a6db611 100644
--- a/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
+++ b/application/sis-console/src/test/java/org/apache/sis/test/suite/ConsoleTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-console} module, in approximative dependency order.
+ * All tests from the {@code sis-console} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
diff --git a/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Transformer.java b/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Transformer.java
index 0424b63..7df0065 100644
--- a/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Transformer.java
+++ b/application/sis-openoffice/src/main/java/org/apache/sis/openoffice/Transformer.java
@@ -46,7 +46,7 @@ import org.apache.sis.storage.DataStoreException;
 final class Transformer {
     /**
      * The geographic area of interest. All values are in degrees. Prime meridian is Greenwich.
-     * Datum does not need to be specified since area of interest is an approximative information.
+     * Datum does not need to be specified since area of interest is an approximated information.
      *
      * @see #hasAreaOfInterest()
      */
diff --git a/application/sis-openoffice/src/test/java/org/apache/sis/test/suite/OpenOfficeTestSuite.java b/application/sis-openoffice/src/test/java/org/apache/sis/test/suite/OpenOfficeTestSuite.java
index 91ab7e1..c047931 100644
--- a/application/sis-openoffice/src/test/java/org/apache/sis/test/suite/OpenOfficeTestSuite.java
+++ b/application/sis-openoffice/src/test/java/org/apache/sis/test/suite/OpenOfficeTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-openoffice} add-ins, in approximative dependency order.
+ * All tests from the {@code sis-openoffice} add-ins, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java b/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
index c3c9fb7..05d460d 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/FeatureFormat.java
@@ -123,7 +123,7 @@ public class FeatureFormat extends TabularFormat<Object> {
      * Maximal length of attribute values, in number of characters.
      * If a value is longer than this length, it will be truncated.
      *
-     * <p>This is defined as a static final variable for now because its value is approximative:
+     * <p>This is defined as a static final variable for now because its value is approximate:
      * it is a number of characters instead than a number of code points, and that length may be
      * exceeded by a few characters if the overflow happen while appending the list separator.</p>
      */
diff --git a/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java b/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
index bf9e9ee..3c18e56 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-feature} module, in approximative dependency order.
+ * All tests from the {@code sis-feature} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @author  Johann Sorel (Geomatys)
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java b/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
index 202b4b0..8191385 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/io/wkt/Formatter.java
@@ -879,7 +879,7 @@ public class Formatter implements Localized {
      * <div class="section">Numerical precision</div>
      * The ISO 19162 standards recommends to format those values with only 2 decimal digits.
      * This is because {@code GeographicBoundingBox} does not specify the datum, so this box
-     * is an approximative information only.
+     * is an approximated information only.
      *
      * @param  bbox  the geographic bounding box to append to the WKT, or {@code null}.
      * @param  fractionDigits  the number of fraction digits to use. The recommended value is 2.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
index 6a934b0..8cd58a1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/DefaultGeographicBoundingBox.java
@@ -517,8 +517,8 @@ public class DefaultGeographicBoundingBox extends AbstractGeographicExtent imple
      * <p>When coordinate transformation is required, the target geographic CRS is not necessarily
      * {@linkplain org.apache.sis.referencing.CommonCRS#WGS84 WGS84}. This method preserves the same
      * {@linkplain org.apache.sis.referencing.datum.DefaultEllipsoid ellipsoid} than in the envelope
-     * CRS when possible. This is because geographic bounding box are only approximative and the ISO
-     * specification do not mandates a particular CRS, so we avoid transformations that are not
+     * CRS when possible. This is because geographic bounding box are only approximated and the ISO
+     * specification does not mandates a particular CRS, so we avoid transformations that are not
      * strictly necessary.</p>
      *
      * <p><b>Note:</b> this method is available only if the referencing module is on the classpath.</p>
@@ -555,7 +555,7 @@ public class DefaultGeographicBoundingBox extends AbstractGeographicExtent imple
      * this class applies a different strategy than GeneralEnvelope. Instead than trying to work directly with
      * the ordinate values without adding or removing offset (which may cause rounding errors), we apply a ±360°
      * shift on longitude values. This simpler strategy is okay here because the range is fixed in the code (not
-     * an arbitrarily high range), and GeographicBoundingBox are approximative by definition anyway.
+     * an arbitrarily high range), and GeographicBoundingBox are approximations by definition anyway.
      */
 
     /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
index 83b2b7e..dd1156b 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java
@@ -229,7 +229,7 @@ public final class Extents extends Static {
      *   </ul>
      *
      *   <div class="note"><b>Rational:</b> like {@linkplain #getGeographicBoundingBox(Extent) geographic bounding box},
-     *   the vertical range is an approximative information; the range returned by this method does not carry any
+     *   the vertical range is an approximated information; the range returned by this method does not carry any
      *   information about the vertical CRS and this method does not attempt to perform coordinate transformation.
      *   But this method is more useful if the returned ranges are close to a frequently used surface, like the
      *   Mean Sea Level. The same simplification is applied in the
@@ -440,8 +440,8 @@ public final class Extents extends Static {
 
     /**
      * Returns an <em>estimation</em> of the area (in square metres) of the given bounding box.
-     * Since {@code GeographicBoundingBox} provides only approximative information (for example
-     * it does not specify the datum), the value returned by this method is also approximative.
+     * Since {@code GeographicBoundingBox} provides only approximated information (for example
+     * it does not specify the datum), the value returned by this method is also approximated.
      *
      * <p>The current implementation performs its computation on the
      * {@linkplain org.apache.sis.referencing.CommonCRS#SPHERE GRS 1980 Authalic Sphere}.
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshallerPool.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshallerPool.java
index a35a90c..d4e0ecf 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshallerPool.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshallerPool.java
@@ -70,7 +70,7 @@ import org.apache.sis.util.CharSequences;
 public class MarshallerPool {
     /**
      * Amount of nanoseconds to wait before to remove unused (un)marshallers.
-     * This is a very approximative value: actual timeout will not be shorter,
+     * This is a very rough value: actual timeout will not be shorter,
      * but may be twice longer.
      */
     private static final long TIMEOUT = 15000000000L;           // 15 seconds.
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java
index 7a24601..7e3d259 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/ExtentsTest.java
@@ -149,7 +149,7 @@ public final strictfp class ExtentsTest extends TestCase {
         /*
          * The nautical mile is equals to the length of 1 second of arc along a meridian or parallel at the equator.
          * Since we are using the GRS80 authalic sphere instead than WGS84, and since the nautical mile definition
-         * itself is a little bit approximative, we add a slight empirical shift.
+         * itself is a little bit approximated, we add a slight empirical shift.
          */
         final DefaultGeographicBoundingBox box = new DefaultGeographicBoundingBox(10, 10+MINUTE, 2.9685, 2.9685+MINUTE);
         assertEquals(NAUTICAL_MILE * NAUTICAL_MILE, Extents.area(box), 0.1);
diff --git a/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java b/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
index 12c12ec..90cde37 100644
--- a/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
+++ b/core/sis-metadata/src/test/java/org/apache/sis/test/suite/MetadataTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-metadata} module, in approximative dependency order.
+ * All tests from the {@code sis-metadata} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/core/sis-raster/src/test/java/org/apache/sis/test/suite/RasterTestSuite.java b/core/sis-raster/src/test/java/org/apache/sis/test/suite/RasterTestSuite.java
index 595b341..7c36d0a 100644
--- a/core/sis-raster/src/test/java/org/apache/sis/test/suite/RasterTestSuite.java
+++ b/core/sis-raster/src/test/java/org/apache/sis/test/suite/RasterTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-raster} module, in approximative dependency order.
+ * All tests from the {@code sis-raster} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
index 269f3f5..281fc24 100644
--- a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
+++ b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
@@ -444,7 +444,7 @@ public class MilitaryGridReferenceSystem extends ReferencingByIdentifiers {
          *   <tr><td style="text-align:right">1000</td> <td>4 Q FJ 12 67</td></tr>
          *   <tr><td style="text-align:right">10 000</td> <td>4 Q FJ 1 6</td></tr>
          *   <tr><td style="text-align:right">100 000</td> <td>4 Q FJ</td></tr>
-         *   <tr><td style="text-align:right">(approximative) 1 000 000</td> <td>4 Q</td></tr>
+         *   <tr><td style="text-align:right">(approximated) 1 000 000</td> <td>4 Q</td></tr>
          * </table>
          *
          * Values smaller than 1 (e.g. 0.01 for a centimetre precision) may also be returned
@@ -804,7 +804,7 @@ public class MilitaryGridReferenceSystem extends ReferencingByIdentifiers {
             }
 
             /**
-             * Guess the number of elements to be returned. The value returned by this method is very approximative,
+             * Guess the number of elements to be returned. The value returned by this method is very rough,
              * and likely greater than the real amount of elements that will actually be returned.
              */
             @Override
diff --git a/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java b/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java
index 9d454e2..3d1ea09 100644
--- a/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java
+++ b/core/sis-referencing-by-identifiers/src/test/java/org/apache/sis/test/suite/ReferencingByIdentifiersTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-referencing-by-identifiers} module, in approximative dependency order.
+ * All tests from the {@code sis-referencing-by-identifiers} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
index 243d58a..f27739a 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelopes.java
@@ -278,7 +278,7 @@ public final class Envelopes extends Static {
 
     /**
      * Transforms an envelope using the given math transform.
-     * The transformation is only approximative: the returned envelope may be bigger than necessary,
+     * The transformation is only approximated: the returned envelope may be bigger than necessary,
      * or smaller than required if the bounding box contains a pole.
      * The coordinate reference system of the returned envelope will be null.
      *
@@ -506,7 +506,7 @@ public final class Envelopes extends Static {
 
     /**
      * Transforms an envelope using the given coordinate operation.
-     * The transformation is only approximative: the returned envelope may be bigger than the
+     * The transformation is only approximated: the returned envelope may be bigger than the
      * smallest possible bounding box, but should not be smaller in most cases.
      *
      * <p>This method can handle the case where the envelope contains the North or South pole,
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java b/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java
index 87baccb..c552834 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/geometry/Shapes2D.java
@@ -151,7 +151,7 @@ public final class Shapes2D extends Static {
 
     /**
      * Transforms a rectangular envelope using the given math transform.
-     * The transformation is only approximative: the returned envelope may be bigger than
+     * The transformation is only approximated: the returned envelope may be bigger than
      * necessary, or smaller than required if the bounding box contains a pole.
      *
      * <p>Note that this method can not handle the case where the rectangle contains the North or South pole,
@@ -374,7 +374,7 @@ public final class Shapes2D extends Static {
 
     /**
      * Transforms a rectangular envelope using the given coordinate operation.
-     * The transformation is only approximative: the returned envelope may be bigger
+     * The transformation is only approximated: the returned envelope may be bigger
      * than the smallest possible bounding box, but should not be smaller in most cases.
      *
      * <p>This method can handle the case where the rectangle contains the North or South pole,
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java
index f7b8596..464c2f7 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/PositionalAccuracyConstant.java
@@ -91,7 +91,7 @@ public final class PositionalAccuracyConstant extends DefaultAbsoluteExternalPos
      * Indicates that a {@linkplain org.opengis.referencing.operation.Transformation transformation}
      * requires a datum shift, but no method has been found applicable. This usually means that no
      * {@linkplain org.apache.sis.referencing.datum.BursaWolfParameters Bursa Wolf parameters} have
-     * been found. Such datum shifts are approximative and may have 1 kilometer error.
+     * been found. Such datum shifts are approximations and may have 1 kilometer error.
      */
     public static final PositionalAccuracy DATUM_SHIFT_OMITTED;
     static {
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
index abce0c2..be44133 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
@@ -840,7 +840,7 @@ public final class CRS extends Static {
             if (bounds != null && !Boolean.FALSE.equals(bounds.getInclusion())) {
                 /*
                  * We do not assign WGS84 unconditionally to the geographic bounding box, because
-                 * it is not defined to be on a particular datum; it is only approximative bounds.
+                 * it is not defined to be on a particular datum; it is only approximated bounds.
                  * We try to get the GeographicCRS from the user-supplied CRS in order to reduce
                  * the amount of transformation needed.
                  */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
index 71b647c..17b80cc 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CommonCRS.java
@@ -145,7 +145,7 @@ public enum CommonCRS {
      *   <tr><th>Abbreviations or aliases:</th><td>(<i>datum:</i> "WGS 84", &nbsp;<i>ellipsoid:</i> "WGS84")</td></tr>
      *   <tr><th>Prime meridian:</th>          <td>Greenwich</td></tr>
      *   <tr><th>Semi-major axis length:</th>  <td>6378137</td></tr>
-     *   <tr><th>Semi-minor axis length:</th>  <td>6356752 <i>(approximative)</i></td></tr>
+     *   <tr><th>Semi-minor axis length:</th>  <td>6356752 <i>(approximated)</i></td></tr>
      *   <tr><th>Inverse flattening:</th>      <td>298.257223563 <i>(definitive)</i></td></tr>
      *   <tr><th>Ellipsoid axes unit:</th>     <td>{@link Units#METRE}</td></tr>
      *   <tr><th>UTM zones:</th>               <td>1 to 60 in North and South hemispheres</td></tr>
@@ -163,7 +163,7 @@ public enum CommonCRS {
      *   <tr><th>Abbreviations or aliases:</th><td>(<i>datum:</i> "WGS 72", &nbsp;<i>ellipsoid:</i> "NWL 10D")</td></tr>
      *   <tr><th>Prime meridian:</th>          <td>Greenwich</td></tr>
      *   <tr><th>Semi-major axis length:</th>  <td>6378135</td></tr>
-     *   <tr><th>Semi-minor axis length:</th>  <td>6356751 <i>(approximative)</i></td></tr>
+     *   <tr><th>Semi-minor axis length:</th>  <td>6356751 <i>(approximated)</i></td></tr>
      *   <tr><th>Inverse flattening:</th>      <td>298.26 <i>(definitive)</i></td></tr>
      *   <tr><th>Ellipsoid axes unit:</th>     <td>{@link Units#METRE}</td></tr>
      *   <tr><th>UTM zones:</th>               <td>1 to 60 in North and South hemispheres</td></tr>
@@ -184,7 +184,7 @@ public enum CommonCRS {
      *   <tr><th>Abbreviations or aliases:</th><td>"NAD83 (1986)" &nbsp;(<i>ellipsoid:</i> "International 1979")</td></tr>
      *   <tr><th>Prime meridian:</th>          <td>Greenwich</td></tr>
      *   <tr><th>Semi-major axis length:</th>  <td>6378137</td></tr>
-     *   <tr><th>Semi-minor axis length:</th>  <td>6356752 <i>(approximative)</i></td></tr>
+     *   <tr><th>Semi-minor axis length:</th>  <td>6356752 <i>(approximated)</i></td></tr>
      *   <tr><th>Inverse flattening:</th>      <td>298.257222101 <i>(definitive)</i></td></tr>
      *   <tr><th>Ellipsoid axes unit:</th>     <td>{@link Units#METRE}</td></tr>
      *   <tr><th>UTM zones:</th>               <td>1 to 23 in the North hemisphere</td></tr>
@@ -227,7 +227,7 @@ public enum CommonCRS {
      *   <tr><th>Abbreviations or aliases:</th><td>"ETRF89", "EUREF89", "ETRS89-GRS80" &nbsp;(<i>ellipsoid:</i> "International 1979")</td></tr>
      *   <tr><th>Prime meridian:</th>          <td>Greenwich</td></tr>
      *   <tr><th>Semi-major axis length:</th>  <td>6378137</td></tr>
-     *   <tr><th>Semi-minor axis length:</th>  <td>6356752 <i>(approximative)</i></td></tr>
+     *   <tr><th>Semi-minor axis length:</th>  <td>6356752 <i>(approximated)</i></td></tr>
      *   <tr><th>Inverse flattening:</th>      <td>298.257222101 <i>(definitive)</i></td></tr>
      *   <tr><th>Ellipsoid axes unit:</th>     <td>{@link Units#METRE}</td></tr>
      *   <tr><th>UTM zones:</th>               <td>28 to 37 in the North hemisphere</td></tr>
@@ -250,7 +250,7 @@ public enum CommonCRS {
      *   <tr><th>Abbreviations or aliases:</th><td>(<i>datum:</i> "ED50", <i>ellipsoid:</i> "Hayford 1909")</td></tr>
      *   <tr><th>Prime meridian:</th>          <td>Greenwich</td></tr>
      *   <tr><th>Semi-major axis length:</th>  <td>6378388</td></tr>
-     *   <tr><th>Semi-minor axis length:</th>  <td>6356912 <i>(approximative)</i></td></tr>
+     *   <tr><th>Semi-minor axis length:</th>  <td>6356912 <i>(approximated)</i></td></tr>
      *   <tr><th>Inverse flattening:</th>      <td>297 <i>(definitive)</i></td></tr>
      *   <tr><th>Ellipsoid axes unit:</th>     <td>{@link Units#METRE}</td></tr>
      *   <tr><th>UTM zones:</th>               <td>28 to 38 in the North hemisphere</td></tr>
@@ -522,7 +522,7 @@ public enum CommonCRS {
      * This default CRS is assigned to
      * {@linkplain org.apache.sis.geometry.GeneralEnvelope#GeneralEnvelope(org.opengis.metadata.extent.GeographicBoundingBox)
      * envelopes created from a geographic bounding box}.
-     * Since ISO 19115 {@link org.opengis.metadata.extent.GeographicBoundingBox} is approximative by definition,
+     * Since ISO 19115 {@link org.opengis.metadata.extent.GeographicBoundingBox} is approximated by definition,
      * their datum can be arbitrary.
      *
      * @return the default two-dimensional geographic CRS with (<var>longitude</var>, <var>latitude</var>) axis order.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
index 4cedd83..1d777b4 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java
@@ -154,7 +154,7 @@ public final class CoordinateSystems extends Static {
      * vertical direction as -90°. The sign of those angles gives no indication about whether the coordinate system
      * is right-handed or left-handed. Those angles are returned as instances of {@link ElevationAngle}.
      *
-     * <p>All angles are approximative since this method does not take the Earth ellipsoidal or geoidal shape in
+     * <p>All angles are approximations since this method does not take the Earth ellipsoidal or geoidal shape in
      * account.</p>
      *
      * <div class="section">Invariants</div>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
index eda7a72..47541c7 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
@@ -567,7 +567,7 @@ public class DefaultCoordinateSystemAxis extends AbstractIdentifiedObject implem
      * i.e. it is caller responsibility to determine if range shall be considered as metadata.
      *
      * @param  that  the axis to compare with this axis.
-     * @param  mode  whether the unit comparison is approximative or exact.
+     * @param  mode  whether the unit comparison is an approximation or exact.
      * @param  cr    {@code true} for comparing also the range minimum and maximum values.
      * @return {@code true} if unit, direction and optionally range extremum are equal.
      */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
index 4ffb16c..6bb4eef 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
@@ -700,7 +700,7 @@ public class DefaultEllipsoid extends AbstractIdentifiedObject implements Ellips
             case IGNORE_METADATA: {
                 /*
                  * "Inverse flattening factor" and "semi-minor axis length" are computed from each other,
-                 * so we do not need to compare both of them. But in non-approximative mode we nevertheless
+                 * so we do not need to compare both of them. But in non-approximated mode we nevertheless
                  * compare both as a safety against rounding errors.
                  */
                 if (!Numerics.equals(getInverseFlattening(), ((Ellipsoid) object).getInverseFlattening())) {
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
index 6b81602..f7d2076 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
@@ -220,7 +220,7 @@ public class EPSGDataAccess extends GeodeticAuthorityFactory implements CRSAutho
     /**
      * The calendar instance for creating {@link Date} objects from a year (the "epoch" in datum definition).
      * We use the UTC timezone, which may not be quite accurate. But there is no obvious timezone for "epoch",
-     * and the "epoch" is approximative anyway.
+     * and the "epoch" is an approximation anyway.
      *
      * @see #getCalendar()
      */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
index b9deded..40a7184 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
@@ -121,7 +121,7 @@ class CoordinateOperationRegistry {
      * The identifier for a transformation which is a datum shift without
      * {@link org.apache.sis.referencing.datum.BursaWolfParameters}.
      * Only the changes in ellipsoid axis-length are taken in account.
-     * Such ellipsoid shifts are approximative and may have 1 kilometre error.
+     * Such ellipsoid shifts are approximations and may have 1 kilometre error.
      *
      * @see org.apache.sis.internal.referencing.PositionalAccuracyConstant#DATUM_SHIFT_OMITTED
      */
@@ -762,7 +762,7 @@ class CoordinateOperationRegistry {
         /*
          * If the user-provided CRS are approximately equal to the coordinate operation CRS, keep the later.
          * The reason is that coordinate operation CRS are built from the definitions provided by the authority,
-         * while the user-provided CRS can be anything (e.g. parsed from a quite approximative WKT).
+         * while the user-provided CRS can be anything (e.g. parsed from a quite approximated WKT).
          */
         CoordinateReferenceSystem crs;
         if (Utilities.equalsApproximatively(sourceCRS, crs = operation.getSourceCRS())) sourceCRS = crs;
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
index a87362c..b45d53a 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/DefaultOperationMethod.java
@@ -268,7 +268,7 @@ public class DefaultOperationMethod extends AbstractIdentifiedObject implements
 
     /**
      * Convenience constructor that creates an operation method from a math transform.
-     * The information provided in the newly created object are approximative, and
+     * The information provided in the newly created object are approximations, and
      * usually acceptable only as a fallback when no other information are available.
      *
      * @param  transform  the math transform to describe.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java
index 2bc05f3..ec4a01c 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/AbstractLinearTransform.java
@@ -297,7 +297,7 @@ abstract class AbstractLinearTransform extends AbstractMathTransform implements
          * for a "Geographic 2D to 3D" conversion it will rather set the new dimensions to zero. So
          * A⁻¹ and B⁻¹ may differ in their "NaN versus 0" values even if A and B are equal.
          *
-         * Opportunistically, the comparison of inverse transforms in approximative mode also ensures
+         * Opportunistically, the comparison of inverse transforms in approximated mode also ensures
          * that we are below the tolerance threshold not only for this matrix, but for the inverse one
          * as well.
          */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
index a41f493..a0e7abc 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransform.java
@@ -518,7 +518,7 @@ public class InterpolatedGeocentricTransform extends DatumShiftTransform {
             vector[2] = z - tZ;
             centricToEllipsoid.transform(vector, 0, vector, 0, derivate);
             /*
-             * We got a (λ,φ) using an approximative geocentric translation. Now interpolate the "real"
+             * We got a (λ,φ) using an approximated geocentric translation. Now interpolate the "real"
              * geocentric interpolation at that location and get the (λ,φ) again. In theory, we just
              * iterate until we got the desired precision. But in practice a single interation is enough.
              */
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java b/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java
index 6e59d4f..09b2657 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/parameter/MapProjectionParametersTest.java
@@ -118,7 +118,7 @@ public final strictfp class MapProjectionParametersTest extends TestCase {
         assertEquals(6356752, parameters.parameter(SEMI_MINOR)        .doubleValue(), 0.5);
         assertTrue("isIvfDefinitive", parameters.parameter(IS_IVF_DEFINITIVE).booleanValue());
 
-        parameters.parameter(SEMI_MAJOR).setValue(6378350.9);  // Clarke 1858 (approximative)
+        parameters.parameter(SEMI_MAJOR).setValue(6378350.9);  // Clarke 1858 (approximated)
         parameters.parameter(SEMI_MINOR).setValue(6356675.0);
         assertEquals(294.26, parameters.parameter(INVERSE_FLATTENING).doubleValue(), 0.001);
         assertFalse("isIvfDefinitive", parameters.parameter(IS_IVF_DEFINITIVE).booleanValue());
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/Benchmark.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/Benchmark.java
index b9753b7..0a76065 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/Benchmark.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/projection/Benchmark.java
@@ -261,7 +261,7 @@ public final class Benchmark {
 
     /**
      * For reporting the errors in more convenient units.
-     * This is an approximative conversion based on the nautical mile length.
+     * This is an approximated conversion based on the nautical mile length.
      */
     private static final double DEGREES_TO_CENTIMETRES = 60*1852*100;
 
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/AbridgedMolodenskyTransformTest.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/AbridgedMolodenskyTransformTest.java
index a972c4e..abebea9 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/AbridgedMolodenskyTransformTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/AbridgedMolodenskyTransformTest.java
@@ -118,8 +118,8 @@ public final strictfp class AbridgedMolodenskyTransformTest extends MathTransfor
         verifyInDomain(CoordinateDomain.GEOGRAPHIC, -1941624852762631518L);
         /*
          * Calculation of "expected" transform derivative by finite difference
-         * seems too approximative for the default accuracy. (Actually, we are
-         * not completely sure that there is no bug in derivative formula...)
+         * does not seem accurate enough for the default accuracy. (Actually,
+         * we are not completely sure that there is no bug in derivative formula).
          */
         tolerance *= 10;
         isDerivativeSupported = true;
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
index abb582b..f09afcb 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/MathTransformTestCase.java
@@ -313,7 +313,7 @@ public abstract strictfp class MathTransformTestCase extends TransformTestCase {
      * The number of dimensions is given by {@code transform.getSourceDimensions()}.
      *
      * @param  domain   the domain of the numbers to be generated.
-     * @param  propNaN  approximative percentage of NaN values as a fraction between 0 and 1, or 0 if none.
+     * @param  propNaN  rough percentage of NaN values as a fraction between 0 and 1, or 0 if none.
      * @return random coordinates in the given domain.
      */
     final double[] generateRandomCoordinates(final CoordinateDomain domain, final float propNaN) {
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java b/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
index d1465d5..b90206e 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/test/suite/ReferencingTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-referencing} module, in approximative dependency order.
+ * All tests from the {@code sis-referencing} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
index 921d3ee..c90a4da 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/StandardDateFormat.java
@@ -218,7 +218,7 @@ public final class StandardDateFormat extends DateFormat {
      * <ul>
      *   <li>If the given date has zero values in hours, minutes, seconds and milliseconds fields in UTC timezone,
      *       then the returned implementation will be a {@link LocalDate}, dropping the timezone information (i.e.
-     *       the date is considered approximative). Note that this is consistent with ISO 19162 requirement that
+     *       the date is considered an approximation). Note that this is consistent with ISO 19162 requirement that
      *       dates are always in UTC, even if Apache SIS allows some flexibility.</li>
      *   <li>Otherwise if the timezone is not {@code null} and not UTC, then this method returns an {@link OffsetDateTime}.</li>
      *   <li>Otherwise this method returns a {@link LocalDateTime} in the given timezone.</li>
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java
index b53add5..e90bc2e 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/X364.java
@@ -278,8 +278,7 @@ search: do {
 
     /**
      * Returns {@code true} if we think that the operating system supports ANSI sequences.
-     * This method performs a very naive and approximative check. Result is just a hint and
-     * may be wrong.
+     * This method performs a very naive and rough check. Result is just a hint and may be wrong.
      *
      * <p>This method does not check if a {@linkplain java.io.Console console} is attached to the
      * running JVM because the caller may want to write to the {@linkplain System#err standard
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/Salinity.java b/core/sis-utility/src/main/java/org/apache/sis/measure/Salinity.java
index c688abd..3c23f5a 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/Salinity.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/Salinity.java
@@ -27,7 +27,7 @@ import javax.measure.Quantity;
  *
  * <p>{@code Salinity} quantities should not be converted to quantities of other types.
  * If nevertheless a conversion to {@link javax.measure.quantity.Dimensionless} is attempted,
- * then Apache SIS implementation maps 1 psu to 1‰ for approximative correspondence with legacy
+ * then Apache SIS implementation maps 1 psu to 1‰ for rough correspondence with legacy
  * (before 1978) salinity measurements.</p>
  *
  * <p>Most quantity types are defined in the {@link javax.measure.quantity}.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java b/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java
index f60a79d..2add892 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/logging/MonolineFormatter.java
@@ -881,7 +881,7 @@ loop:   for (int i=0; ; i++) {
              * Find the index of the stack trace element where the log has been produced.
              * If no exact match is found, some heuristic is applied (the first element
              * from the same class, or the first element from the logger package). If no
-             * approximative match is found, then the default value is the last element.
+             * approximated match is found, then the default value is the last element.
              */
             int logProducer = trace.length;
             boolean useLoggerName = (loggerName != null), useClassName = true;
diff --git a/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java b/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
index f48c77a..eef2619 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-utility} module, in approximative dependency order.
+ * All tests from the {@code sis-utility} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/ide-project/NetBeans/nbproject/genfiles.properties b/ide-project/NetBeans/nbproject/genfiles.properties
index 3d72294..59cb803 100644
--- a/ide-project/NetBeans/nbproject/genfiles.properties
+++ b/ide-project/NetBeans/nbproject/genfiles.properties
@@ -3,6 +3,6 @@
 build.xml.data.CRC32=58e6b21c
 build.xml.script.CRC32=462eaba0
 build.xml.stylesheet.CRC32=28e38971@1.53.1.46
-nbproject/build-impl.xml.data.CRC32=420189c7
+nbproject/build-impl.xml.data.CRC32=7824aa7b
 nbproject/build-impl.xml.script.CRC32=a7689f96
 nbproject/build-impl.xml.stylesheet.CRC32=3a2fa800@1.89.1.48
diff --git a/ide-project/NetBeans/nbproject/project.xml b/ide-project/NetBeans/nbproject/project.xml
index 42b2236..7f0d6bf 100644
--- a/ide-project/NetBeans/nbproject/project.xml
+++ b/ide-project/NetBeans/nbproject/project.xml
@@ -82,6 +82,7 @@
             <word>bilevel</word>
             <word>bitmask</word>
             <word>boolean</word>
+            <word>centimetre</word>
             <word>classname</word>
             <word>classnames</word>
             <word>classpath</word>
@@ -94,6 +95,7 @@
             <word>hectopascals</word>
             <word>initially</word>
             <word>javadoc</word>
+            <word>kilometre</word>
             <word>loggings</word>
             <word>maintainance</word>
             <word>marshallable</word>
@@ -102,6 +104,7 @@
             <word>marshallers</word>
             <word>marshalling</word>
             <word>metadata</word>
+            <word>metres</word>
             <word>monospaced</word>
             <word>namespace</word>
             <word>namespaces</word>
diff --git a/profiles/sis-french-profile/src/test/java/org/apache/sis/test/suite/FrenchProfileTestSuite.java b/profiles/sis-french-profile/src/test/java/org/apache/sis/test/suite/FrenchProfileTestSuite.java
index 15fb0b7..24d2433 100644
--- a/profiles/sis-french-profile/src/test/java/org/apache/sis/test/suite/FrenchProfileTestSuite.java
+++ b/profiles/sis-french-profile/src/test/java/org/apache/sis/test/suite/FrenchProfileTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-french-profile} module, in approximative dependency order.
+ * All tests from the {@code sis-french-profile} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.4
diff --git a/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html b/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html
index 77f5589..786ce9a 100644
--- a/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html
+++ b/storage/sis-earth-observation/src/main/java/org/apache/sis/storage/earthobservation/doc-files/LandsatMetadata.html
@@ -150,10 +150,10 @@
       <tr><td><code>  │   ├─</code>Spatial resolution (3 of 3)</td>       <td><code class="rf">GRID_CELL_SIZE_THERMAL</code></td>   <td>The grid cell size in meters for the thermal bands, if part of the product.</td></tr>
       <tr><td><code>  │   └─</code>Extent</td>                            <td></td>                                                 <td></td></tr>
       <tr><td><code>  │       ├─</code>Geographic element</td>            <td></td>                                                 <td></td></tr>
-      <tr><td><code>  │       │   ├─</code>West bound longitude:</td>     <td><code>min(<span class="rf">CORNER_*_LON_PRODUCT</span>)</code></td> <td>The western-most longitude value in degrees (approximative).</td></tr>
-      <tr><td><code>  │       │   ├─</code>East bound longitude:</td>     <td><code>max(<span class="rf">CORNER_*_LON_PRODUCT</span>)</code></td> <td>The eastern-most longitude value in degrees (approximative).</td></tr>
-      <tr><td><code>  │       │   ├─</code>South bound latitude:</td>     <td><code>min(<span class="rf">CORNER_*_LAT_PRODUCT</span>)</code></td> <td>The southern-most longitude value in degrees (approximative).</td></tr>
-      <tr><td><code>  │       │   ├─</code>North bound latitude:</td>     <td><code>max(<span class="rf">CORNER_*_LAT_PRODUCT</span>)</code></td> <td>The northern-most longitude value in degrees (approximative).</td></tr>
+      <tr><td><code>  │       │   ├─</code>West bound longitude:</td>     <td><code>min(<span class="rf">CORNER_*_LON_PRODUCT</span>)</code></td> <td>The western-most longitude value in degrees (approximation).</td></tr>
+      <tr><td><code>  │       │   ├─</code>East bound longitude:</td>     <td><code>max(<span class="rf">CORNER_*_LON_PRODUCT</span>)</code></td> <td>The eastern-most longitude value in degrees (approximation).</td></tr>
+      <tr><td><code>  │       │   ├─</code>South bound latitude:</td>     <td><code>min(<span class="rf">CORNER_*_LAT_PRODUCT</span>)</code></td> <td>The southern-most longitude value in degrees (approximation).</td></tr>
+      <tr><td><code>  │       │   ├─</code>North bound latitude:</td>     <td><code>max(<span class="rf">CORNER_*_LAT_PRODUCT</span>)</code></td> <td>The northern-most longitude value in degrees (approximation).</td></tr>
       <tr><td><code>  │       │   └─</code>Extent type code:</td>         <td>true</td>                                             <td></td></tr>
       <tr><td><code>  │       └─</code>Temporal element</td>              <td></td>                                                 <td></td></tr>
       <tr><td><code>  │           └─</code>Start time:</td>               <td><code><span class="rf">DATE_ACQUIRED</span> + <span class="rf">SCENE_CENTER_TIME</span></code></td> <td>The date and center time the image was acquired.</td></tr>
diff --git a/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java b/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java
index b59ab40..7e85a2f 100644
--- a/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java
+++ b/storage/sis-earth-observation/src/test/java/org/apache/sis/test/suite/EarthObservationTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-earth-observation} module, in approximative dependency order.
+ * All tests from the {@code sis-earth-observation} module, in rough dependency order.
  *
  * @author  Thi Phuong Hao Nguyen (VNSC)
  * @author  Martin Desruisseaux (Geomatys)
diff --git a/storage/sis-gdal/src/test/java/org/apache/sis/test/suite/GDALTestSuite.java b/storage/sis-gdal/src/test/java/org/apache/sis/test/suite/GDALTestSuite.java
index 3aa69a0..71e6d50 100644
--- a/storage/sis-gdal/src/test/java/org/apache/sis/test/suite/GDALTestSuite.java
+++ b/storage/sis-gdal/src/test/java/org/apache/sis/test/suite/GDALTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.runners.Suite;
 
 
 /**
- * All tests from the {@code sis-gdal} module, in approximative dependency order.
+ * All tests from the {@code sis-gdal} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
diff --git a/storage/sis-geotiff/src/test/java/org/apache/sis/test/suite/GeoTiffTestSuite.java b/storage/sis-geotiff/src/test/java/org/apache/sis/test/suite/GeoTiffTestSuite.java
index 779b956..5c25f9f 100644
--- a/storage/sis-geotiff/src/test/java/org/apache/sis/test/suite/GeoTiffTestSuite.java
+++ b/storage/sis-geotiff/src/test/java/org/apache/sis/test/suite/GeoTiffTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-geotiff} module, in approximative dependency order.
+ * All tests from the {@code sis-geotiff} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.8
diff --git a/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java b/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java
index c2e7d41..86a4a19 100644
--- a/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java
+++ b/storage/sis-netcdf/src/test/java/org/apache/sis/test/suite/NetcdfTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-netcdf} module, in approximative dependency order.
+ * All tests from the {@code sis-netcdf} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/storage/sis-shapefile/src/test/java/org/apache/sis/test/suite/ShapefileTestSuite.java b/storage/sis-shapefile/src/test/java/org/apache/sis/test/suite/ShapefileTestSuite.java
index ddae2bf..f7de34d 100644
--- a/storage/sis-shapefile/src/test/java/org/apache/sis/test/suite/ShapefileTestSuite.java
+++ b/storage/sis-shapefile/src/test/java/org/apache/sis/test/suite/ShapefileTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-shapefile} module, in approximative dependency order.
+ * All tests from the {@code sis-shapefile} module, in rough dependency order.
  */
 @Suite.SuiteClasses({
     org.apache.sis.storage.shapefile.ShapeFileTest.class,
diff --git a/storage/sis-sqlstore/src/test/java/org/apache/sis/test/suite/SQLTestSuite.java b/storage/sis-sqlstore/src/test/java/org/apache/sis/test/suite/SQLTestSuite.java
index f84182a..2ed67d8 100644
--- a/storage/sis-sqlstore/src/test/java/org/apache/sis/test/suite/SQLTestSuite.java
+++ b/storage/sis-sqlstore/src/test/java/org/apache/sis/test/suite/SQLTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-sqlstore} module, in approximative dependency order.
+ * All tests from the {@code sis-sqlstore} module, in rough dependency order.
  */
 @Suite.SuiteClasses({
     org.apache.sis.storage.sql.SQLStoreTest.class
diff --git a/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java b/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
index 7c5a533..5f6a1c3 100644
--- a/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
+++ b/storage/sis-storage/src/test/java/org/apache/sis/test/suite/StorageTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-storage} module, in approximative dependency order.
+ * All tests from the {@code sis-storage} module, in rough dependency order.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/storage/sis-xmlstore/src/test/java/org/apache/sis/test/suite/GPXTestSuite.java b/storage/sis-xmlstore/src/test/java/org/apache/sis/test/suite/GPXTestSuite.java
index 154e9f4..e3ce9d9 100644
--- a/storage/sis-xmlstore/src/test/java/org/apache/sis/test/suite/GPXTestSuite.java
+++ b/storage/sis-xmlstore/src/test/java/org/apache/sis/test/suite/GPXTestSuite.java
@@ -22,7 +22,7 @@ import org.junit.BeforeClass;
 
 
 /**
- * All tests from the {@code sis-xmlstore} module, in approximative dependency order.
+ * All tests from the {@code sis-xmlstore} module, in rough dependency order.
  */
 @Suite.SuiteClasses({
     org.apache.sis.internal.storage.gpx.TypesTest.class,


[sis] 02/02: Add more tests.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 66a0c8714ae283384f77aaec63504f68f7d82e7e
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Tue Dec 4 21:13:20 2018 +0100

    Add more tests.
---
 .../java/org/apache/sis/coverage/Category.java     |   8 +-
 .../java/org/apache/sis/coverage/CategoryList.java |   2 +-
 .../org/apache/sis/coverage/SampleDimension.java   | 120 +++++++++++++++------
 .../org/apache/sis/internal/raster/Resources.java  |  10 ++
 .../sis/internal/raster/Resources.properties       |   2 +
 .../sis/internal/raster/Resources_fr.properties    |   2 +
 .../apache/sis/coverage/SampleDimensionTest.java   |  73 +++++++++++++
 .../org/apache/sis/test/suite/RasterTestSuite.java |   3 +-
 .../org/apache/sis/measure/MeasurementRange.java   |  18 ++++
 .../main/java/org/apache/sis/measure/Range.java    |  19 +++-
 10 files changed, 219 insertions(+), 38 deletions(-)

diff --git a/core/sis-raster/src/main/java/org/apache/sis/coverage/Category.java b/core/sis-raster/src/main/java/org/apache/sis/coverage/Category.java
index e744602..013326d 100644
--- a/core/sis-raster/src/main/java/org/apache/sis/coverage/Category.java
+++ b/core/sis-raster/src/main/java/org/apache/sis/coverage/Category.java
@@ -345,17 +345,17 @@ search:         if (!padValues.add(ordinal)) {
 
     /**
      * Returns the range of values after conversions by the transfer function.
-     * If a unit of measurement is available, then this range will be an instance of {@link MeasurementRange}.
-     * This range is absent if there is no transfer function, i.e. this category is qualitative.
+     * This range is absent if there is no transfer function, i.e. if this category is qualitative.
      *
      * @return the range of values after conversion by the transfer function.
      *
      * @see SampleDimension#getMeasurementRange()
      */
-    public Optional<NumberRange<?>> getMeasurementRange() {
+    public Optional<MeasurementRange<?>> getMeasurementRange() {
         // Same assumption than in 'isQuantitative()'.
         assert isPublic() : this;
-        return Optional.ofNullable(converted.range);
+        // A ClassCastException below would be a bug in our constructor.
+        return Optional.ofNullable((MeasurementRange<?>) converted.range);
     }
 
     /**
diff --git a/core/sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java b/core/sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java
index a973632..1fcc080 100644
--- a/core/sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java
+++ b/core/sis-raster/src/main/java/org/apache/sis/coverage/CategoryList.java
@@ -86,7 +86,7 @@ final class CategoryList extends AbstractList<Category> implements MathTransform
      * The "main" category, or {@code null} if there is none. The main category
      * is the quantitative category with the widest range of sample values.
      */
-    private final Category main;
+    final Category main;
 
     /**
      * The category to use if {@link #search(double)} is invoked with a sample value greater than all ranges in this list.
diff --git a/core/sis-raster/src/main/java/org/apache/sis/coverage/SampleDimension.java b/core/sis-raster/src/main/java/org/apache/sis/coverage/SampleDimension.java
index cb9301a..8b0bbbc 100644
--- a/core/sis-raster/src/main/java/org/apache/sis/coverage/SampleDimension.java
+++ b/core/sis-raster/src/main/java/org/apache/sis/coverage/SampleDimension.java
@@ -19,6 +19,7 @@ package org.apache.sis.coverage;
 import java.util.List;
 import java.util.ArrayList;
 import java.util.Set;
+import java.util.TreeSet;
 import java.util.HashSet;
 import java.util.Optional;
 import java.util.Collections;
@@ -27,6 +28,7 @@ import javax.measure.Unit;
 import org.opengis.util.InternationalString;
 import org.opengis.referencing.operation.MathTransform1D;
 import org.apache.sis.referencing.operation.transform.TransferFunction;
+import org.apache.sis.internal.raster.Resources;
 import org.apache.sis.measure.MeasurementRange;
 import org.apache.sis.measure.NumberRange;
 import org.apache.sis.util.resources.Vocabulary;
@@ -62,7 +64,10 @@ import org.apache.sis.util.Numbers;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @version 1.0
- * @since   1.0
+ *
+ * @see org.opengis.metadata.content.SampleDimension
+ *
+ * @since 1.0
  * @module
  */
 public final class SampleDimension implements Serializable {
@@ -133,25 +138,41 @@ public final class SampleDimension implements Serializable {
     /**
      * Returns the values to indicate "no data" for this sample dimension.
      *
-     * @return the values to indicate no data values for this sample dimension, or an empty list if none.
+     * @return the values to indicate no data values for this sample dimension, or an empty set if none.
+     * @throws IllegalStateException if this method can not expand the range of no data values, for example
+     *         because some ranges contain an infinite amount of values.
      */
-    public List<Number> getNoDataValues() {
+    public Set<Number> getNoDataValues() {
         if (!categories.hasQuantitative()) {
-            return Collections.emptyList();
+            return Collections.emptySet();
         }
-        final List<Number> noDataValues = new ArrayList<>(categories.size());
+        final NumberRange<?>[] ranges = new NumberRange<?>[categories.size()];
+        Class<? extends Number> widestClass = Byte.class;
+        int count = 0;
         for (final Category c : categories) {
             if (!c.isQuantitative()) {
-                final NumberRange<?> r = c.range;
-                final Number value;
-                if (r.isMinIncluded()) {
-                    value = r.getMinDouble();
-                } else if (r.isMaxIncluded()) {
-                    value = r.getMaxDouble();
-                } else {
-                    value = (c.minimum + c.maximum) / 2;
+                if (!c.range.isBounded()) {
+                    throw new IllegalStateException(Resources.format(Resources.Keys.CanNotEnumerateValuesInRange_1, c.range));
+                }
+                widestClass = Numbers.widestClass(widestClass, c.range.getElementType());
+                ranges[count++] = c.range;
+            }
+        }
+        final Set<Number> noDataValues = new TreeSet<>();
+        for (int i=0; i<count; i++) {
+            final NumberRange<?> range = ranges[i];
+            final Number minimum = range.getMinValue();
+            final Number maximum = range.getMaxValue();
+            if (range.isMinIncluded()) noDataValues.add(Numbers.cast(minimum, widestClass));
+            if (range.isMaxIncluded()) noDataValues.add(Numbers.cast(maximum, widestClass));
+            if (Numbers.isInteger(range.getElementType())) {
+                long value = minimum.longValue() + 1;       // If value was inclusive, then it has already been added to the set.
+                long stop  = maximum.longValue() - 1;
+                while (value <= stop) {
+                    noDataValues.add(Numbers.wrap(value, widestClass));
                 }
-                noDataValues.add(value);
+            } else if (!minimum.equals(maximum)) {
+                throw new IllegalStateException(Resources.format(Resources.Keys.CanNotEnumerateValuesInRange_1, range));
             }
         }
         return noDataValues;
@@ -172,56 +193,93 @@ public final class SampleDimension implements Serializable {
 
     /**
      * Returns the range of values after conversions by the transfer function.
-     * If a unit of measurement is available, then this range will be an instance of {@link MeasurementRange}.
      * This range is absent if there is no transfer function.
      *
      * @return the range of values after conversion by the transfer function.
+     *
+     * @see #getUnits()
      */
-    public Optional<NumberRange<?>> getMeasurementRange() {
-        return Optional.ofNullable(categories.converted.range);
+    public Optional<MeasurementRange<?>> getMeasurementRange() {
+        // A ClassCastException below would be a bug in our constructors.
+        return Optional.ofNullable((MeasurementRange<?>) categories.converted.range);
     }
 
     /**
      * Returns the <cite>transfer function</cite> from sample values to real values.
      * This method returns a transform expecting sample values as input and computing real values as output.
      * The output units of measurement is given by {@link #getUnits()}.
-     * This transform will take care of converting all "{@linkplain #getNoDataValues() no data values}" into {@code NaN} values.
+     *
+     * <p>This transform takes care of converting all "{@linkplain #getNoDataValues() no data values}" into {@code NaN} values.
      * The <code>transferFunction.{@linkplain MathTransform1D#inverse() inverse()}</code> transform is capable to differentiate
-     * {@code NaN} values to get back the original sample value.
+     * those {@code NaN} values and get back the original sample value.</p>
      *
      * @return the <cite>transfer function</cite> from sample to real values. May be absent if this sample dimension
-     *         do not defines any transform (which is not the same that defining an identity transform).
-     *
-     * @see TransferFunction
+     *         does not define any transform (which is not the same that defining an identity transform).
      */
     public Optional<MathTransform1D> getTransferFunction() {
         return Optional.ofNullable(transferFunction);
     }
 
     /**
+     * Returns the offset and scale factors of the transfer function.
+     * The formula returned by this method does <strong>not</strong> take
+     * "{@linkplain #getNoDataValues() no data values}" in account.
+     * For a more generic transfer function, see {@link #getTransferFunction()}.
+     *
+     * @return a description of the part of the transfer function working on real numbers.
+     * @throws IllegalStateException if the transfer function can not be simplified in a form representable
+     *         by {@link TransferFunction}.
+     */
+    public Optional<TransferFunction> getTransferFunctionFormula() {
+        MathTransform1D tr = null;
+        for (final Category category : categories) {
+            if (category.isQuantitative()) {
+                if (tr == null) {
+                    tr = category.transferFunction;
+                } else if (!tr.equals(category.transferFunction)) {
+                    throw new IllegalStateException(Resources.format(Resources.Keys.CanNotSimplifyTransferFunction_1));
+                }
+            }
+        }
+        if (tr == null) {
+            return Optional.empty();
+        }
+        final TransferFunction f = new TransferFunction();
+        try {
+            f.setTransform(tr);
+        } catch (IllegalArgumentException e) {
+            throw new IllegalStateException(Resources.format(Resources.Keys.CanNotSimplifyTransferFunction_1, e));
+        }
+        return Optional.of(f);
+    }
+
+    /**
      * Returns the units of measurement for this sample dimension.
      * This unit applies to values obtained after the {@linkplain #getTransferFunction() transfer function}.
      * May be absent if not applicable.
      *
      * @return the units of measurement.
+     * @throws IllegalStateException if this sample dimension use different units.
+     *
+     * @see #getMeasurementRange()
      */
     public Optional<Unit<?>> getUnits() {
-        Unit<?> units = null;
+        Unit<?> main = null;
         for (final Category c : categories.converted) {
             final NumberRange<?> r = c.range;
             if (r instanceof MeasurementRange<?>) {
-                final Unit<?> u = ((MeasurementRange<?>) r).unit();
-                if (u != null) {
-                    if (units == null) {
-                        units = u;
-                    } else if (!units.equals(u)) {
-                        units = null;                   // Different quantitative categories use different units.
-                        break;
+                final Unit<?> unit = ((MeasurementRange<?>) r).unit();
+                if (unit != null) {
+                    if (main != null && !main.equals(unit)) {
+                        throw new IllegalStateException();
+                    }
+                    if (main == null || c == categories.converted.main) {
+                        main = unit;
                     }
                 }
             }
         }
-        return Optional.ofNullable(units);
+        return Optional.ofNullable(main);
     }
 
     /**
diff --git a/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources.java b/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources.java
index 6eeaa30..9a7ef3f 100644
--- a/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources.java
+++ b/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources.java
@@ -59,11 +59,21 @@ public final class Resources extends IndexedResourceBundle {
         }
 
         /**
+         * Can not enumerate values in the {0} range.
+         */
+        public static final short CanNotEnumerateValuesInRange_1 = 18;
+
+        /**
          * Some envelope dimensions can not be mapped to grid dimensions.
          */
         public static final short CanNotMapToGridDimensions = 12;
 
         /**
+         * Can not simplify transfer function of sample dimension “{0}”.
+         */
+        public static final short CanNotSimplifyTransferFunction_1 = 19;
+
+        /**
          * The two categories “{0}” and “{2}” have overlapping ranges: {1} and {3} respectively.
          */
         public static final short CategoryRangeOverlap_4 = 13;
diff --git a/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources.properties b/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources.properties
index 2c2f5a6..53cdae1 100644
--- a/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources.properties
+++ b/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources.properties
@@ -19,7 +19,9 @@
 # Resources in this file are for "sis-raster" usage only and should not be used by any other module.
 # For resources shared by all modules in the Apache SIS project, see "org.apache.sis.util.resources" package.
 #
+CanNotEnumerateValuesInRange_1    = Can not enumerate values in the {0} range.
 CanNotMapToGridDimensions         = Some envelope dimensions can not be mapped to grid dimensions.
+CanNotSimplifyTransferFunction_1  = Can not simplify transfer function of sample dimension \u201c{0}\u201d.
 CategoryRangeOverlap_4            = The two categories \u201c{0}\u201d and \u201c{2}\u201d have overlapping ranges: {1} and {3} respectively.
 CoordinateOutsideDomain_2         = The ({0}, {1}) pixel coordinate is outside iterator domain.
 IllegalCategoryRange_2            = Sample value range {1} for \u201c{0}\u201d category is illegal.
diff --git a/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources_fr.properties b/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources_fr.properties
index f118ccb..29c230e 100644
--- a/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources_fr.properties
+++ b/core/sis-raster/src/main/java/org/apache/sis/internal/raster/Resources_fr.properties
@@ -24,7 +24,9 @@
 #   U+202F NARROW NO-BREAK SPACE  before  ; ! and ?
 #   U+00A0 NO-BREAK SPACE         before  :
 #
+CanNotEnumerateValuesInRange_1    = Ne peut pas \u00e9num\u00e9rer les valeurs dans la plage {0}.
 CanNotMapToGridDimensions         = Certaines dimensions de l\u2019enveloppe ne correspondent pas \u00e0 des dimensions de la grille.
+CanNotSimplifyTransferFunction_1  = Ne peut pas simplifier la fonction de transfert de la dimension d\u2019\u00e9chantillonnage \u00ab\u202f{0}\u202f\u00bb.
 CategoryRangeOverlap_4            = Les deux cat\u00e9gories \u00ab\u202f{0}\u202f\u00bb et \u00ab\u202f{2}\u202f\u00bb ont des plages de valeurs qui se chevauchent\u2008: {1} et {3} respectivement.
 CoordinateOutsideDomain_2         = La coordonn\u00e9e pixel ({0}, {1}) est en dehors du domaine de l\u2019it\u00e9rateur.
 IllegalCategoryRange_2            = La plage de valeurs {1} pour la cat\u00e9gorie \u00ab\u202f{0}\u202f\u00bb est ill\u00e9gale.
diff --git a/core/sis-raster/src/test/java/org/apache/sis/coverage/SampleDimensionTest.java b/core/sis-raster/src/test/java/org/apache/sis/coverage/SampleDimensionTest.java
new file mode 100644
index 0000000..bc3bf75
--- /dev/null
+++ b/core/sis-raster/src/test/java/org/apache/sis/coverage/SampleDimensionTest.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.coverage;
+
+import java.util.Set;
+import org.apache.sis.measure.NumberRange;
+import org.apache.sis.referencing.operation.transform.TransferFunction;
+import org.apache.sis.measure.Units;
+import org.apache.sis.test.TestCase;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+
+/**
+ * Tests {@link SampleDimension}.
+ *
+ * @author  Martin Desruisseaux (IRD, Geomatys)
+ * @version 1.0
+ * @since   1.0
+ * @module
+ */
+public final strictfp class SampleDimensionTest extends TestCase {
+    /**
+     * Tests the creation of a sample dimensions using builder, then verifies the dimension properties.
+     */
+    @Test
+    public void testBuilder() {
+        final int    lower  = 10;
+        final int    upper  = 200;
+        final double scale  = 0.1;
+        final double offset = 5.0;
+        final SampleDimension test = new SampleDimension.Builder()
+                .addQualitative(null,      0)           // Default to "No data" name, potentially locale.
+                .addQualitative("Clouds",  1)
+                .addQualitative("Lands", 255)
+                .addQuantitative("Temperature", lower, upper, scale, offset, Units.CELSIUS)
+                .build();
+
+        final Set<Number> nodataValues = test.getNoDataValues();
+        assertArrayEquals(new Integer[] {0, 1, 255}, nodataValues.toArray());
+
+        final TransferFunction tr = test.getTransferFunctionFormula().get();
+        assertFalse ("identity",  test.getTransferFunction().get().isIdentity());
+        assertFalse ("identity",  tr.getTransform().isIdentity());
+        assertEquals("scale",     scale,  tr.getScale(),  STRICT);
+        assertEquals("offset",    offset, tr.getOffset(), STRICT);
+
+        NumberRange<?> range = test.getSampleRange().get();
+        assertEquals("minimum",   0,   range.getMinDouble(), STRICT);
+        assertEquals("maximum",   255, range.getMaxDouble(), STRICT);
+
+        range = test.getMeasurementRange().get();
+        assertEquals("minimum", lower*scale+offset, range.getMinDouble(true),  CategoryTest.EPS);
+        assertEquals("maximum", upper*scale+offset, range.getMaxDouble(false), CategoryTest.EPS);
+
+        assertEquals("units", Units.CELSIUS, test.getUnits().get());
+    }
+}
diff --git a/core/sis-raster/src/test/java/org/apache/sis/test/suite/RasterTestSuite.java b/core/sis-raster/src/test/java/org/apache/sis/test/suite/RasterTestSuite.java
index 7c36d0a..5b90307 100644
--- a/core/sis-raster/src/test/java/org/apache/sis/test/suite/RasterTestSuite.java
+++ b/core/sis-raster/src/test/java/org/apache/sis/test/suite/RasterTestSuite.java
@@ -35,7 +35,8 @@ import org.junit.BeforeClass;
     org.apache.sis.coverage.grid.GridExtentTest.class,
     org.apache.sis.coverage.grid.GridGeometryTest.class,
     org.apache.sis.coverage.CategoryTest.class,
-    org.apache.sis.coverage.CategoryListTest.class
+    org.apache.sis.coverage.CategoryListTest.class,
+    org.apache.sis.coverage.SampleDimensionTest.class
 })
 public final strictfp class RasterTestSuite extends TestSuite {
     /**
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java b/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
index 595e1a9..59d03c5 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
@@ -36,10 +36,18 @@ import org.apache.sis.util.resources.Errors;
  *       Usage of {@code MeasurementRange} with integer types is possible, but no convenience
  *       method is provided for integers because they are usually not representative of the
  *       nature of physical measurements.</li>
+ *   <li>{@link #unit()} for getting the unit of measurement associated to this range.</li>
  *   <li>{@link #convertTo(Unit)} for converting the unit of measurement.</li>
  *   <li>{@link #castTo(Class)} for casting the range values to an other type.</li>
  * </ul>
  *
+ * <div class="section">Null unit of measurement</div>
+ * The unit of measurement should not be null, otherwise a {@link NumberRange} should be used
+ * instead than {@code MeasurementRange}. Nevertheless this class is tolerant to {@code null}
+ * units in order to support situations where a unit of measurement <em>should</em> be specified,
+ * but for some reason is unavailable. If the unit of measurement become known at a later stage,
+ * it can be specified by a call to {@link #convertTo(Unit)}.
+ *
  * <div class="section">Immutability and thread safety</div>
  * This class is immutable and thus inherently thread-safe.
  * Subclasses may or may not be immutable, at implementation choice. But implementors are
@@ -227,6 +235,16 @@ public class MeasurementRange<E extends Number & Comparable<? super E>> extends
 
     /**
      * Returns the unit of measurement, or {@code null} if unknown.
+     * In principle the unit should never be null, otherwise a {@link NumberRange} should have been used
+     * instead than {@code MeasurementRange}. Nevertheless this method may return {@code null} if a unit
+     * <em>should</em> exist but for some reason is unavailable.
+     *
+     * <div class="note"><b>Example:</b>
+     * ISO 19115-1 {@code SampleDimension} specifies that its
+     * {@linkplain org.opengis.metadata.content.SampleDimension#getUnits() unit} property is mandatory if the
+     * {@linkplain org.opengis.metadata.content.SampleDimension#getMinValue() minimum value} or
+     * {@linkplain org.opengis.metadata.content.SampleDimension#getMaxValue() maximum value} are provided.
+     * Nevertheless it happens sometime that this information is missing in metadata.</div>
      *
      * @return the unit of measurement, or {@code null}.
      */
diff --git a/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java b/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
index 75ae9d7..bfe06f5 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
@@ -80,7 +80,7 @@ import org.apache.sis.util.Numbers;
  * @author  Joe White
  * @author  Martin Desruisseaux (Geomatys)
  * @author  Jody Garnett (for parameterized type inspiration)
- * @version 0.8
+ * @version 1.0
  *
  * @param <E>  the type of range elements, typically a {@link Number} subclass or {@link java.util.Date}.
  *
@@ -287,6 +287,23 @@ public class Range<E extends Comparable<? super E>> implements CheckedContainer<
     }
 
     /**
+     * Returns {@code true} if this range is both left-bounded and right-bounded.
+     * A {@code true} return value guarantees that:
+     *
+     * <ol>
+     *   <li>both {@link #getMinValue()} and {@link #getMaxValue()} will return non-null values;</li>
+     *   <li>if minimum and maximum values are numbers, then those numbers are finite.</li>
+     * </ol>
+     *
+     * @return whether this range is left- and right-bounded.
+     *
+     * @since 1.0
+     */
+    public boolean isBounded() {
+        return minValue != null && maxValue != null;
+    }
+
+    /**
      * Returns {@code true} if this range contains the given value. A range never contains the
      * {@code null} value. This is consistent with the <a href="#skip-navbar_top">class javadoc</a>
      * stating that null {@linkplain #getMinValue() minimum} or {@linkplain #getMaxValue() maximum}