[sis] branch fix/unrecognized_dimension deleted (was 8328861)

2021-10-14 Thread desruisseaux
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a change to branch fix/unrecognized_dimension
in repository https://gitbox.apache.org/repos/asf/sis.git.


 was 8328861  fix(NetCDF): fix newly added resource key

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


[sis] branch geoapi-4.0 updated: Fix `IndexOutOfBoundsException` which was thrown when `FeatureSet` has no geometry property. The fix is indirect, by making an `isEmpty` flag to become `true` when the

2021-10-14 Thread desruisseaux
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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
 new c9abccd  Fix `IndexOutOfBoundsException` which was thrown when 
`FeatureSet` has no geometry property. The fix is indirect, by making an 
`isEmpty` flag to become `true` when there is no geometry. This is an attempt 
to address the https://github.com/apache/sis/pull/22 pull request without 
discarding the whole feature (features without geometry should be legal).
c9abccd is described below

commit c9abccdfef31e050d214a5ba70c82ffe86c77020
Author: Martin Desruisseaux 
AuthorDate: Thu Oct 14 23:03:58 2021 +0200

Fix `IndexOutOfBoundsException` which was thrown when `FeatureSet` has no 
geometry property.
The fix is indirect, by making an `isEmpty` flag to become `true` when 
there is no geometry.
This is an attempt to address the https://github.com/apache/sis/pull/22 
pull request
without discarding the whole feature (features without geometry should be 
legal).
---
 .../src/main/java/org/apache/sis/internal/netcdf/FeatureSet.java  | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/FeatureSet.java
 
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/FeatureSet.java
index cd7f4aa..4f37dde 100644
--- 
a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/FeatureSet.java
+++ 
b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/FeatureSet.java
@@ -64,7 +64,7 @@ import org.opengis.feature.Attribute;
  * It may be inefficient unless the {@link Decoder} uses a {@code 
ChannelDataInput} backed by a direct buffer.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.2
  * @since   0.8
  * @module
  */
@@ -141,6 +141,10 @@ final class FeatureSet extends DiscreteSampling {
  *   {@link GeometryType#LINEAR} with coordinates stored in {@link 
#dynamicProperties}.
  * 
  *
+ * If there is no coordinates ({@link #referencingDimension} = 0), then 
this field shall be {@code true}.
+ * This is a convenience for the way we compute an {@code isEmpty} flag in 
{@code tryAdvance(Consumer)}.
+ * This policy may change in any future version.
+ *
  * @see #TRAJECTORY
  * @see #getReferencingDimension(boolean)
  */
@@ -195,8 +199,8 @@ final class FeatureSet extends DiscreteSampling {
 this.properties   = properties;
 this.dynamicProperties= dynamicProperties;
 this.referencingDimension = selectedAxes.size();
+this.isTrajectory = isTrajectory | (referencingDimension == 0);
 this.hasTime  = hasTime;
-this.isTrajectory = isTrajectory;
 /*
  * We will create a description of the features to be read with 
following properties:
  *


[sis] 01/01: Merge branch 'geoapi-3.1'. This is mostly post 1.1-release cleanup and fixes of some of the bugs discovered in this process.

2021-10-14 Thread desruisseaux
This is an automated email from the ASF dual-hosted git repository.

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

commit 465f0bf78cc712a9620096488dee26a5b47ade22
Merge: 90e1d9d 1e0f827
Author: Martin Desruisseaux 
AuthorDate: Thu Oct 14 18:29:16 2021 +0200

Merge branch 'geoapi-3.1'. This is mostly post 1.1-release cleanup and 
fixes of some of the bugs discovered in this process.

 NOTICE |   2 +-
 application/sis-console/src/main/artifact/bin/sis  |   2 +-
 application/sis-javafx/src/main/artifact/bin/sisfx |   4 +-
 .../sis-javafx/src/main/artifact/bin/sisfx.bat |   2 +-
 .../org/apache/sis/internal/book/Assembler.java|  84 +++-
 .../org/apache/sis/internal/book/package-info.java |  30 +++--
 .../org/apache/sis/coverage/BandedCoverage.java|  24 +++-
 .../java/org/apache/sis/coverage/CategoryList.java |   4 +-
 .../org/apache/sis/coverage/SampleDimension.java   |  46 +--
 .../org/apache/sis/coverage/grid/GridCoverage.java |  21 ++-
 .../sis/coverage/grid/GridCoverageBuilder.java |   2 +-
 .../apache/sis/coverage/grid/GridDerivation.java   | 136 ++-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  29 +
 .../apache/sis/coverage/grid/GridExtentCRS.java|  36 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |  26 +---
 .../apache/sis/coverage/grid/ImageRenderer.java|  32 +
 .../org/apache/sis/coverage/grid/package-info.java |   2 +-
 .../java/org/apache/sis/coverage/package-info.java |   2 +-
 .../org/apache/sis/feature/AbstractFeature.java|  66 --
 .../java/org/apache/sis/feature/DenseFeature.java  |  12 +-
 .../java/org/apache/sis/feature/SparseFeature.java |  40 +++---
 .../java/org/apache/sis/image/PixelIterator.java   |   7 +-
 .../apache/sis/coverage/grid/GridExtentTest.java   |  29 -
 .../apache/sis/internal/jaxb/gts/package-info.java |   5 +-
 .../sis/metadata/iso/quality/AbstractElement.java  |   3 +-
 .../iso/quality/AbstractTemporalAccuracy.java  |   6 +-
 .../DefaultNonQuantitativeAttributeAccuracy.java   |   6 +-
 .../main/java/org/apache/sis/xml/Namespaces.java   |  14 +-
 .../main/java/org/apache/sis/xml/package-info.java |   2 +-
 .../java/org/apache/sis/test/sql/TestDatabase.java |   2 +-
 .../sis/test/xml/AnnotationConsistencyCheck.java   |   2 +-
 .../org/apache/sis/geometry/CoordinateFormat.java  |  16 +--
 .../java/org/apache/sis/geometry/package-info.java |   2 +-
 .../main/java/org/apache/sis/io/wkt/Symbols.java   |  26 +---
 .../java/org/apache/sis/io/wkt/package-info.java   |   2 +-
 .../org/apache/sis/referencing/datum/formulas.html |  24 ++--
 .../apache/sis/referencing/datum/package-info.java |   3 +-
 .../sis/referencing/factory/sql/EPSGInstaller.java |  28 +++-
 .../operation/builder/LocalizationGridBuilder.java |  41 +-
 .../operation/builder/package-info.java|   2 +-
 .../referencing/operation/matrix/MatrixSIS.java|   2 +-
 .../referencing/operation/transform/formulas.html  |  54 +---
 .../org/apache/sis/referencing/package-info.java   |   3 +-
 .../sis/referencing/factory/TestFactorySource.java |   2 +-
 .../java/org/apache/sis/setup/Configuration.java   |   2 +-
 .../main/java/org/apache/sis/util/Characters.java  |  26 +---
 .../apache/sis/util/logging/PerformanceLevel.java  |  27 +---
 .../org/apache/sis/util/logging/package-info.java  |   2 +-
 .../java/org/apache/sis/util/package-info.java |   2 +-
 .../sis/util/logging/PerformanceLevelTest.java |   8 +-
 pom.xml|   1 -
 .../sis/storage/earthobservation/LandsatStore.java |  73 ---
 .../earthobservation/LandsatStoreProvider.java |  44 ---
 .../sis/storage/earthobservation/package-info.java |  45 ---
 .../java/org/apache/sis/storage/landsat/Band.java  |   4 +-
 .../sis/storage/landsat/LandsatStoreProvider.java  |   4 +-
 .../sis/internal/geotiff/SchemaModifier.java   |  23 +++-
 .../apache/sis/internal/geotiff/package-info.java  |   2 +-
 .../sis/storage/geotiff/ImageFileDirectory.java|  19 ++-
 .../apache/sis/storage/geotiff/package-info.java   |   2 +-
 .../sis/storage/netcdf/NetcdfStoreProvider.java|  17 ++-
 .../apache/sis/internal/sql/feature/Analyzer.java  |  16 +--
 .../apache/sis/internal/sql/feature/Database.java  |   6 +-
 .../sis/internal/sql/feature/FeatureAdapter.java   |   6 +-
 .../sis/internal/sql/feature/FeatureAnalyzer.java  |  12 +-
 .../sis/internal/sql/feature/FeatureStream.java|   9 +-
 .../sis/internal/sql/feature/QueryAnalyzer.java|   2 +-
 .../apache/sis/internal/sql/feature/Relation.java  |  28 +++-
 .../sis/internal/sql/feature/SchemaModifier.java   |  14 +-
 .../org/apache/sis/internal/sql/feature/Table.java |   8 +-
 .../sis/internal/sql/feature/TableAnalyzer.java|  35 +++--
 .../sis/internal/sql/feature/package-info.java |   2 +-
 

[sis] branch master updated (90e1d9d -> 465f0bf)

2021-10-14 Thread desruisseaux
This is an automated email from the ASF dual-hosted git repository.

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


from 90e1d9d  Set version number to 1.2-SNAPSHOT for next development cycle.
 add c9948aa  Remove generation of C/C++ header files (not used anymore 
after removal of "sis-gdal" module). More paranoiac check for rounding errors 
in `normalizeColumns()`.
 add 02d787c  More robust shell script for launching JavaFX or console 
application. The "source" command is bash-specifc; the POSIX equivalent is a 
single dot.
 add 911a413  Avoid recursivity with "exported" foreigner keys in addition 
of "imported" ones.
 add f311c23  Avoid a never-ending loop in `equals(Object)` and 
`hashCode()` if their is recursive associations between features.
 add 0493468  Avoid calls to deprecated 
`PGSimpleDataSource.setServerName(String)` method.
 add 594f9c0  Change the JSR-363 link to a more descriptive page in 
`NOTICE` file.
 add aa29b4d  Fix item count when an offset or a limit is specified. Fix 
malformed SQL statement when the WHERE clause is empty.
 add 2b995e7  Add `BandedCoverage.getCoordinateReferenceSystem()` and 
`getEnvelope()` methods.
 add bc7c80e  Update the developer guide generator for the new directory 
layout of Apache SIS web site.
 add fabb532  Replace deprecated  tag in MathML.
 add 0d3f39d  Add a note about possible replacement for our custom tools 
assembling the developer-guide.
 add c929255  Fix an illegal coordinate system when 
`GridExtent.toEnvelope(…)` is invoked on a grid extent that contains a temporal 
axis.
 add 144d579  Verifies if EPSG data are available in the 
"$SIS_DATA/Databases/ExternalSources" directory before to ask user to download 
them.
 add 844534c  Add a `CanNotProbeException` for allowing user to know which 
`DataStoreProvider` failed to probe a file. It makes possible to exclude that 
provider from next `probeContent(…)` calls if desired.
 add 9ab3d88  Post 1.1 release: remove deprecated methods.
 add c910ee0  Fix erroneous tile indices when subsampling is larger than 
tile size.
 add 15c26d8  Fix an inconsistency in tile index calculation when the first 
rendered image has an offset and a subsampling is applied.
 add 6dbc0b9  GeoTIFF reader should declare "GDAL_NODATA" tag as the "fill 
value" of `SampleDimension`.
 add 4946333  If `GDAL_NODATA` value is 0, declare the background value 
explicitely anyway.
 add 3acaee5  Document better the use of `SampleDimension.Builder`.
 add 1e0f827  Merge branch 'geoapi-4.0' into geoapi-3.1
 new 465f0bf  Merge branch 'geoapi-3.1'. This is mostly post 1.1-release 
cleanup and fixes of some of the bugs discovered in this process.

The 1 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:
 NOTICE |   2 +-
 application/sis-console/src/main/artifact/bin/sis  |   2 +-
 application/sis-javafx/src/main/artifact/bin/sisfx |   4 +-
 .../sis-javafx/src/main/artifact/bin/sisfx.bat |   2 +-
 .../org/apache/sis/internal/book/Assembler.java|  84 +++-
 .../org/apache/sis/internal/book/package-info.java |  30 +++--
 .../org/apache/sis/coverage/BandedCoverage.java|  24 +++-
 .../java/org/apache/sis/coverage/CategoryList.java |   4 +-
 .../org/apache/sis/coverage/SampleDimension.java   |  46 +--
 .../org/apache/sis/coverage/grid/GridCoverage.java |  21 ++-
 .../sis/coverage/grid/GridCoverageBuilder.java |   2 +-
 .../apache/sis/coverage/grid/GridDerivation.java   | 136 ++-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  29 +
 .../apache/sis/coverage/grid/GridExtentCRS.java|  36 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |  26 +---
 .../apache/sis/coverage/grid/ImageRenderer.java|  32 +
 .../org/apache/sis/coverage/grid/package-info.java |   2 +-
 .../java/org/apache/sis/coverage/package-info.java |   2 +-
 .../org/apache/sis/feature/AbstractFeature.java|  66 --
 .../java/org/apache/sis/feature/DenseFeature.java  |  12 +-
 .../java/org/apache/sis/feature/SparseFeature.java |  40 +++---
 .../java/org/apache/sis/image/PixelIterator.java   |   7 +-
 .../apache/sis/coverage/grid/GridExtentTest.java   |  29 -
 .../apache/sis/internal/jaxb/gts/package-info.java |   5 +-
 .../sis/metadata/iso/quality/AbstractElement.java  |   3 +-
 .../iso/quality/AbstractTemporalAccuracy.java  |   6 +-
 .../DefaultNonQuantitativeAttributeAccuracy.java   |   6 +-
 .../main/java/org/apache/sis/xml/Namespaces.java   |  14 +-
 .../main/java/org/apache/sis/xml/package-info.java |   2 +-
 .../java/org/apache/sis/test/sql/TestDatabase.java |   2 +-
 

[sis] branch geoapi-3.1 updated (527f492 -> 1e0f827)

2021-10-14 Thread desruisseaux
This is an automated email from the ASF dual-hosted git repository.

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


from 527f492  Merge branch 'geoapi-4.0' into geoapi-3.1
 add c9948aa  Remove generation of C/C++ header files (not used anymore 
after removal of "sis-gdal" module). More paranoiac check for rounding errors 
in `normalizeColumns()`.
 add 02d787c  More robust shell script for launching JavaFX or console 
application. The "source" command is bash-specifc; the POSIX equivalent is a 
single dot.
 add 911a413  Avoid recursivity with "exported" foreigner keys in addition 
of "imported" ones.
 add f311c23  Avoid a never-ending loop in `equals(Object)` and 
`hashCode()` if their is recursive associations between features.
 add 0493468  Avoid calls to deprecated 
`PGSimpleDataSource.setServerName(String)` method.
 add 594f9c0  Change the JSR-363 link to a more descriptive page in 
`NOTICE` file.
 add aa29b4d  Fix item count when an offset or a limit is specified. Fix 
malformed SQL statement when the WHERE clause is empty.
 add 2b995e7  Add `BandedCoverage.getCoordinateReferenceSystem()` and 
`getEnvelope()` methods.
 add bc7c80e  Update the developer guide generator for the new directory 
layout of Apache SIS web site.
 add fabb532  Replace deprecated  tag in MathML.
 add 0d3f39d  Add a note about possible replacement for our custom tools 
assembling the developer-guide.
 add c929255  Fix an illegal coordinate system when 
`GridExtent.toEnvelope(…)` is invoked on a grid extent that contains a temporal 
axis.
 add 144d579  Verifies if EPSG data are available in the 
"$SIS_DATA/Databases/ExternalSources" directory before to ask user to download 
them.
 add 844534c  Add a `CanNotProbeException` for allowing user to know which 
`DataStoreProvider` failed to probe a file. It makes possible to exclude that 
provider from next `probeContent(…)` calls if desired.
 add 9ab3d88  Post 1.1 release: remove deprecated methods.
 add c910ee0  Fix erroneous tile indices when subsampling is larger than 
tile size.
 add 15c26d8  Fix an inconsistency in tile index calculation when the first 
rendered image has an offset and a subsampling is applied.
 add 6dbc0b9  GeoTIFF reader should declare "GDAL_NODATA" tag as the "fill 
value" of `SampleDimension`.
 add 4946333  If `GDAL_NODATA` value is 0, declare the background value 
explicitely anyway.
 add 3acaee5  Document better the use of `SampleDimension.Builder`.
 new 1e0f827  Merge branch 'geoapi-4.0' into geoapi-3.1

The 1 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:
 NOTICE |   2 +-
 application/sis-console/src/main/artifact/bin/sis  |   2 +-
 application/sis-javafx/src/main/artifact/bin/sisfx |   4 +-
 .../sis-javafx/src/main/artifact/bin/sisfx.bat |   2 +-
 .../org/apache/sis/internal/book/Assembler.java|  84 +++-
 .../org/apache/sis/internal/book/package-info.java |  30 +++--
 .../org/apache/sis/coverage/BandedCoverage.java|  24 +++-
 .../java/org/apache/sis/coverage/CategoryList.java |   4 +-
 .../org/apache/sis/coverage/SampleDimension.java   |  46 +--
 .../org/apache/sis/coverage/grid/GridCoverage.java |  21 ++-
 .../sis/coverage/grid/GridCoverageBuilder.java |   2 +-
 .../apache/sis/coverage/grid/GridDerivation.java   | 136 ++-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  29 +
 .../apache/sis/coverage/grid/GridExtentCRS.java|  36 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |  26 +---
 .../apache/sis/coverage/grid/ImageRenderer.java|  32 +
 .../org/apache/sis/coverage/grid/package-info.java |   2 +-
 .../java/org/apache/sis/coverage/package-info.java |   2 +-
 .../org/apache/sis/feature/AbstractFeature.java|  66 --
 .../java/org/apache/sis/feature/DenseFeature.java  |  12 +-
 .../java/org/apache/sis/feature/SparseFeature.java |  40 +++---
 .../java/org/apache/sis/image/PixelIterator.java   |   7 +-
 .../apache/sis/coverage/grid/GridExtentTest.java   |  29 -
 .../apache/sis/internal/jaxb/gts/package-info.java |   5 +-
 .../sis/metadata/iso/quality/AbstractElement.java  |   3 +-
 .../iso/quality/AbstractTemporalAccuracy.java  |   6 +-
 .../DefaultNonQuantitativeAttributeAccuracy.java   |   6 +-
 .../main/java/org/apache/sis/xml/Namespaces.java   |  14 +-
 .../main/java/org/apache/sis/xml/package-info.java |   2 +-
 .../java/org/apache/sis/test/sql/TestDatabase.java |   2 +-
 .../sis/test/xml/AnnotationConsistencyCheck.java   |   2 +-
 .../org/apache/sis/geometry/CoordinateFormat.java  |  16 +--
 .../java/org/apache/sis/geometry/package-info.java |   2 +-
 

[sis] 01/01: Merge branch 'geoapi-4.0' into geoapi-3.1

2021-10-14 Thread desruisseaux
This is an automated email from the ASF dual-hosted git repository.

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

commit 1e0f827faafdbdfbfb5b35a176a3c9ff740cd541
Merge: 527f492 3acaee5
Author: Martin Desruisseaux 
AuthorDate: Thu Oct 14 18:14:50 2021 +0200

Merge branch 'geoapi-4.0' into geoapi-3.1

 NOTICE |   2 +-
 application/sis-console/src/main/artifact/bin/sis  |   2 +-
 application/sis-javafx/src/main/artifact/bin/sisfx |   4 +-
 .../sis-javafx/src/main/artifact/bin/sisfx.bat |   2 +-
 .../org/apache/sis/internal/book/Assembler.java|  84 +++-
 .../org/apache/sis/internal/book/package-info.java |  30 +++--
 .../org/apache/sis/coverage/BandedCoverage.java|  24 +++-
 .../java/org/apache/sis/coverage/CategoryList.java |   4 +-
 .../org/apache/sis/coverage/SampleDimension.java   |  46 +--
 .../org/apache/sis/coverage/grid/GridCoverage.java |  21 ++-
 .../sis/coverage/grid/GridCoverageBuilder.java |   2 +-
 .../apache/sis/coverage/grid/GridDerivation.java   | 136 ++-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  29 +
 .../apache/sis/coverage/grid/GridExtentCRS.java|  36 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |  26 +---
 .../apache/sis/coverage/grid/ImageRenderer.java|  32 +
 .../org/apache/sis/coverage/grid/package-info.java |   2 +-
 .../java/org/apache/sis/coverage/package-info.java |   2 +-
 .../org/apache/sis/feature/AbstractFeature.java|  66 --
 .../java/org/apache/sis/feature/DenseFeature.java  |  12 +-
 .../java/org/apache/sis/feature/SparseFeature.java |  40 +++---
 .../java/org/apache/sis/image/PixelIterator.java   |   7 +-
 .../apache/sis/coverage/grid/GridExtentTest.java   |  29 -
 .../apache/sis/internal/jaxb/gts/package-info.java |   5 +-
 .../sis/metadata/iso/quality/AbstractElement.java  |   3 +-
 .../iso/quality/AbstractTemporalAccuracy.java  |   6 +-
 .../DefaultNonQuantitativeAttributeAccuracy.java   |   6 +-
 .../main/java/org/apache/sis/xml/Namespaces.java   |  14 +-
 .../main/java/org/apache/sis/xml/package-info.java |   2 +-
 .../java/org/apache/sis/test/sql/TestDatabase.java |   2 +-
 .../sis/test/xml/AnnotationConsistencyCheck.java   |   2 +-
 .../org/apache/sis/geometry/CoordinateFormat.java  |  16 +--
 .../java/org/apache/sis/geometry/package-info.java |   2 +-
 .../main/java/org/apache/sis/io/wkt/Symbols.java   |  26 +---
 .../java/org/apache/sis/io/wkt/package-info.java   |   2 +-
 .../org/apache/sis/referencing/datum/formulas.html |  24 ++--
 .../apache/sis/referencing/datum/package-info.java |   3 +-
 .../sis/referencing/factory/sql/EPSGInstaller.java |  28 +++-
 .../operation/builder/LocalizationGridBuilder.java |  41 +-
 .../operation/builder/package-info.java|   2 +-
 .../referencing/operation/matrix/MatrixSIS.java|   2 +-
 .../referencing/operation/transform/formulas.html  |  54 +---
 .../org/apache/sis/referencing/package-info.java   |   3 +-
 .../sis/referencing/factory/TestFactorySource.java |   2 +-
 .../java/org/apache/sis/setup/Configuration.java   |   2 +-
 .../main/java/org/apache/sis/util/Characters.java  |  26 +---
 .../apache/sis/util/logging/PerformanceLevel.java  |  27 +---
 .../org/apache/sis/util/logging/package-info.java  |   2 +-
 .../java/org/apache/sis/util/package-info.java |   2 +-
 .../sis/util/logging/PerformanceLevelTest.java |   8 +-
 pom.xml|   1 -
 .../sis/storage/earthobservation/LandsatStore.java |  73 ---
 .../earthobservation/LandsatStoreProvider.java |  44 ---
 .../sis/storage/earthobservation/package-info.java |  45 ---
 .../java/org/apache/sis/storage/landsat/Band.java  |   4 +-
 .../sis/storage/landsat/LandsatStoreProvider.java  |   4 +-
 .../sis/internal/geotiff/SchemaModifier.java   |  23 +++-
 .../apache/sis/internal/geotiff/package-info.java  |   2 +-
 .../sis/storage/geotiff/ImageFileDirectory.java|  19 ++-
 .../apache/sis/storage/geotiff/package-info.java   |   2 +-
 .../sis/storage/netcdf/NetcdfStoreProvider.java|  17 ++-
 .../apache/sis/internal/sql/feature/Analyzer.java  |  16 +--
 .../apache/sis/internal/sql/feature/Database.java  |   6 +-
 .../sis/internal/sql/feature/FeatureAdapter.java   |   6 +-
 .../sis/internal/sql/feature/FeatureAnalyzer.java  |  12 +-
 .../sis/internal/sql/feature/FeatureStream.java|   9 +-
 .../sis/internal/sql/feature/QueryAnalyzer.java|   2 +-
 .../apache/sis/internal/sql/feature/Relation.java  |  28 +++-
 .../sis/internal/sql/feature/SchemaModifier.java   |  14 +-
 .../org/apache/sis/internal/sql/feature/Table.java |   8 +-
 .../sis/internal/sql/feature/TableAnalyzer.java|  35 +++--
 .../sis/internal/sql/feature/package-info.java |   2 +-
 .../java/org/apache/sis/storage/sql/SQLStore.java  |  33 +
 .../apache/sis/storage/sql/SQLStoreProvider.java   |   5 

[sis] branch feat/default-background updated (5fa1d3d -> 73d1a15)

2021-10-14 Thread amanin
This is an automated email from the ASF dual-hosted git repository.

amanin pushed a change to branch feat/default-background
in repository https://gitbox.apache.org/repos/asf/sis.git.


 discard 5fa1d3d  doc(Core): improve SampleDimension apidoc regarding 
background value management.
 discard 4048225  feat(Core): Add a fallback to try and define a background 
value
 add a8fa5a1  feat(Core): Add a fallback to try and define a background 
value
 add 73d1a15  doc(Core): improve SampleDimension apidoc regarding 
background value management.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5fa1d3d)
\
 N -- N -- N   refs/heads/feat/default-background (73d1a15)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/sis/coverage/SampleDimensionTest.java| 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)


[sis] branch feat/default-background created (now 5fa1d3d)

2021-10-14 Thread amanin
This is an automated email from the ASF dual-hosted git repository.

amanin pushed a change to branch feat/default-background
in repository https://gitbox.apache.org/repos/asf/sis.git.


  at 5fa1d3d  doc(Core): improve SampleDimension apidoc regarding 
background value management.

This branch includes the following new commits:

 new 4048225  feat(Core): Add a fallback to try and define a background 
value
 new 5fa1d3d  doc(Core): improve SampleDimension apidoc regarding 
background value management.

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.



[sis] 01/02: feat(Core): Add a fallback to try and define a background value

2021-10-14 Thread amanin
This is an automated email from the ASF dual-hosted git repository.

amanin pushed a commit to branch feat/default-background
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 4048225cfccc5a38eec5d758f8b089aedbd13af0
Author: Alexis Manin 
AuthorDate: Thu Oct 14 13:24:45 2021 +0200

feat(Core): Add a fallback to try and define a background value

When user does not explicitly define a background value, a best effort 
strategy tries to find an appropriate fallback.
---
 .../org/apache/sis/coverage/SampleDimension.java   | 73 ++
 .../apache/sis/coverage/SampleDimensionTest.java   | 42 +
 2 files changed, 115 insertions(+)

diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
index fe97d55..551a3af 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.coverage;
 
+import java.util.Comparator;
 import java.util.List;
 import java.util.AbstractList;
 import java.util.Arrays;
@@ -27,7 +28,10 @@ import java.util.Locale;
 import java.util.Objects;
 import java.util.Optional;
 import java.io.Serializable;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import javax.measure.Unit;
+import org.apache.sis.util.logging.Logging;
 import org.opengis.util.GenericName;
 import org.opengis.util.InternationalString;
 import org.opengis.referencing.operation.MathTransform1D;
@@ -1104,10 +1108,79 @@ defName:if (name == null) {
 }
 name = 
createLocalName(Vocabulary.formatInternational(Vocabulary.Keys.Untitled));
 }
+
+// Putting background defaulting in a dedicated method make it 
easier to disable/evolve.
+verifyBackground();
+
 return new SampleDimension(name, toNaN.background, 
UnmodifiableArrayList.wrap(categories, 0, count));
 }
 
 /**
+ * Try to define a background value if none has been defined by user.
+ * Note that this is a best-effort. It analyzes available categories 
types and names. If it finds a very common
+ * case in category naming/typing, it will promote the related 
category minimum value as background. Otherwise,
+ * the background value is left unset.
+ */
+private void verifyBackground() {
+if (toNaN.background != null) return;
+final Logger logger = Logging.getLogger("org.apache.sis.coverage");
+try {
+Arrays.stream(categories, 0, count)
+.map(this::score)
+.filter(it -> it != null && it.score > 0)
+
.sorted(Comparator.comparing(BackgroundCandidate::getScore).reversed())
+.findFirst()
+.ifPresent(promoted -> {
+logger.log(Level.FINE,
+"No background value set by user. 
Defaulting to {}." +
+"Use `setBackground()` to short 
this automatic choice.",
+promoted.category);
+toNaN.background = 
promoted.category.getSampleRange().getMinValue();
+});
+} catch (Exception e) {
+logger.log(Level.FINEST, "Defaulting background value failed", 
e);
+}
+}
+
+/**
+ * Compute a score for a category. The score represent the chances for 
the category to be a good replacement for
+ * an explicitly set background. The higher the score, the better. 
Note that any result with a 0 score should be
+ * rejected.
+ *
+ * @param candidate A category to evaluate as a candidate for 
background value. Do not accept null values.
+ * @return The input category with associated score. Can be null if 
input category is not a good candidate.
+ */
+private BackgroundCandidate score(Category candidate) {
+if (candidate.isQuantitative() || 
candidate.getSampleRange().getMinValue() == null) return null;
+
+final String enName = candidate.getName()
+.toString(Locale.ENGLISH)
+.toLowerCase(Locale.ENGLISH);
+if (enName.equals("background")) return new 
BackgroundCandidate(1f, candidate);
+else if (enName.equals("fill-value") || 
enName.equals("fill_value") || enName.equals("fill")) return new 
BackgroundCandidate(0.9f, candidate);
+else if (enName.equals("no-data") || enName.equals("no_data") || 
enName.equals("no data")) return new BackgroundCandidate(0.8f, candidate);
+else if (enName.equals("missing-value") || 
enName.equals("missing_value") || 

[sis] 02/02: doc(Core): improve SampleDimension apidoc regarding background value management.

2021-10-14 Thread amanin
This is an automated email from the ASF dual-hosted git repository.

amanin pushed a commit to branch feat/default-background
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 5fa1d3da4987fb774d279e2d360a72b33aa2d161
Author: Alexis Manin 
AuthorDate: Thu Oct 14 14:26:22 2021 +0200

doc(Core): improve SampleDimension apidoc regarding background value 
management.
---
 .../org/apache/sis/coverage/SampleDimension.java   | 33 ++
 1 file changed, 33 insertions(+)

diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
index 551a3af..3d0b742 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
@@ -73,6 +73,15 @@ import org.apache.sis.util.Debug;
  * but organized in a different way. The use of the same name may seem a risk, 
but those two types are typically
  * not used at the same time.
  *
+ * Definition of missing data
+ * An important aspect of sample dimensions is the {@link #getBackground() 
background value}. It defines how to
+ * initialize an empty canvas/matrix with respect to the sample definition. It 
is the value that defines the main/
+ * default "lack of data" (fill value, no-data, missing value) category.
+ *
+ * It is recommended to define it to enforce stable behavior upon associated 
data processing. As a last resort, sample
+ * dimension {@link Builder builder} will try to identify an acceptable 
default background value by searching for a
+ * qualitative category named background, fill-value or 
no-data.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @version 1.1
  *
@@ -699,6 +708,9 @@ public class SampleDimension implements Serializable {
 /**
  * Adds a qualitative category for samples of the given boolean value.
  * The {@code true} value is represented by 1 and the {@code false} 
value is represented by 0.
+ * 
+ * It is strongly recommended using {@link 
#setBackground(CharSequence, Number)} instead of this method when the
+ * aim is to define a main/primary fill value.
  *
  * Implementation note:
  * this convenience method delegates to {@link 
#addQualitative(CharSequence, NumberRange)}.
@@ -716,6 +728,9 @@ public class SampleDimension implements Serializable {
 /**
  * Adds a qualitative category for samples of the given tiny (8 bits) 
integer value.
  * The argument is treated as a signed integer ({@value 
Byte#MIN_VALUE} to {@value Byte#MAX_VALUE}).
+ * 
+ * It is strongly recommended using {@link 
#setBackground(CharSequence, Number)} instead of this method when the
+ * aim is to define a main/primary fill value.
  *
  * Implementation note:
  * this convenience method delegates to {@link 
#addQualitative(CharSequence, NumberRange)}.
@@ -732,6 +747,9 @@ public class SampleDimension implements Serializable {
 /**
  * Adds a qualitative category for samples of the given short (16 
bits) integer value.
  * The argument is treated as a signed integer ({@value 
Short#MIN_VALUE} to {@value Short#MAX_VALUE}).
+ * 
+ * It is strongly recommended using {@link 
#setBackground(CharSequence, Number)} instead of this method when the
+ * aim is to define a main/primary fill value.
  *
  * Implementation note:
  * this convenience method delegates to {@link 
#addQualitative(CharSequence, NumberRange)}.
@@ -748,6 +766,9 @@ public class SampleDimension implements Serializable {
 /**
  * Adds a qualitative category for samples of the given integer value.
  * The argument is treated as a signed integer ({@value 
Integer#MIN_VALUE} to {@value Integer#MAX_VALUE}).
+ * 
+ * It is strongly recommended using {@link 
#setBackground(CharSequence, Number)} instead of this method when the
+ * aim is to define a main/primary fill value.
  *
  * Implementation note:
  * this convenience method delegates to {@link 
#addQualitative(CharSequence, NumberRange)}.
@@ -766,6 +787,9 @@ public class SampleDimension implements Serializable {
  *
  * Implementation note:
  * this convenience method delegates to {@link 
#addQualitative(CharSequence, NumberRange)}.
+ * 
+ * It is strongly recommended using {@link 
#setBackground(CharSequence, Number)} instead of this method when the
+ * aim is to define a main/primary fill value.
  *
  * @param  namethe category name as a {@link String} or {@link 
InternationalString} object,
  * or {@code null} for a default "no data" name.
@@ -788,6 +812,9 @@ public class SampleDimension implements Serializable {
  *

[sis] 01/02: If `GDAL_NODATA` value is 0, declare the background value explicitely anyway.

2021-10-14 Thread desruisseaux
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 49463335c673b2493669ba89e62fa775b91f8a96
Author: Martin Desruisseaux 
AuthorDate: Thu Oct 14 11:16:20 2021 +0200

If `GDAL_NODATA` value is 0, declare the background value explicitely 
anyway.
---
 .../main/java/org/apache/sis/coverage/CategoryList.java  |  4 ++--
 .../main/java/org/apache/sis/coverage/package-info.java  |  2 +-
 .../org/apache/sis/internal/geotiff/SchemaModifier.java  | 13 +++--
 .../apache/sis/storage/geotiff/ImageFileDirectory.java   | 16 +---
 4 files changed, 19 insertions(+), 16 deletions(-)

diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/CategoryList.java 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/CategoryList.java
index 60586ad..0536fb6 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/CategoryList.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/CategoryList.java
@@ -69,7 +69,7 @@ import static java.lang.Double.doubleToRawLongBits;
  * Instances of {@link CategoryList} are immutable and thread-safe.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 1.1
+ * @version 1.2
  * @since   1.0
  * @module
  */
@@ -346,7 +346,7 @@ final class CategoryList extends AbstractList 
implements MathTransform
  * This check is important for "unit to sample" conversions, 
because we typically expect all
  * results to be convertible to integers (ignoring rounding 
errors).
  */
-if (converse.categories.length != 0) {
+if (background == null && converse.categories.length != 0) {
 final NumberRange cr = converse.categories[0].range;
 final double cv = cr.getMinDouble();
 if ((cv > 0) || (cv == 0 && !cr.isMinIncluded())) {
diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/package-info.java 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/package-info.java
index 2b67959..3f34ae4 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/package-info.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/package-info.java
@@ -23,7 +23,7 @@
  * {@link org.apache.sis.coverage.grid}.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.2
  * @since   1.0
  * @module
  */
diff --git 
a/storage/sis-geotiff/src/main/java/org/apache/sis/internal/geotiff/SchemaModifier.java
 
b/storage/sis-geotiff/src/main/java/org/apache/sis/internal/geotiff/SchemaModifier.java
index ed21c4b..781defc 100644
--- 
a/storage/sis-geotiff/src/main/java/org/apache/sis/internal/geotiff/SchemaModifier.java
+++ 
b/storage/sis-geotiff/src/main/java/org/apache/sis/internal/geotiff/SchemaModifier.java
@@ -74,20 +74,13 @@ public interface SchemaModifier {
  * Implementations can override this method for setting a better name or 
for declaring the
  * meaning of sample values (by adding "categories").
  *
- * API note:
- * the zero fill value is excluded because tiles are already initialized 
to zero by default,
- * and because conversions between "real world" values and "packaged 
values" already use 0
- * as the background value if no category is specified. We avoid 
specifying categories when
- * not necessary because GeoTIFF does not really has this information.
- * 
- *
- * The default implementation creates categories only if {@code fillValue} 
is non-null.
- * In such case, the fill value is also defined as the background value.
+ * The default implementation creates categories only if {@code 
fillValue} is non-null.
+ * In such case, the fill value is also defined as the background 
value.
  *
  * @param  imageindex of the image for which to create sample 
dimension.
  * @param  band index of the band for which to create sample 
dimension.
  * @param  sampleRange  minimum and maximum values declared in the TIFF 
tags, or {@code null} if unknown.
- * @param  fillValuethe "no data" value, or {@code null} if none or 
zero. May intersect {@code sampleRange}.
+ * @param  fillValuethe "no data" value, or {@code null} if none. May 
intersect {@code sampleRange}.
  * @param  dimensiona sample dimension builder initialized with band 
number as the dimension name.
  *  This builder can be modified in-place.
  * @return the sample dimension to use.
diff --git 
a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
 
b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
index 0cc2f23..480dc73 100644
--- 
a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ImageFileDirectory.java
+++ 

[sis] 02/02: Document better the use of `SampleDimension.Builder`.

2021-10-14 Thread desruisseaux
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 3acaee5bff84683027763e7787eadbd7918446fc
Author: Martin Desruisseaux 
AuthorDate: Thu Oct 14 12:29:05 2021 +0200

Document better the use of `SampleDimension.Builder`.
---
 .../org/apache/sis/coverage/SampleDimension.java   | 46 +++---
 1 file changed, 32 insertions(+), 14 deletions(-)

diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
index bc09f3a..fe97d55 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/SampleDimension.java
@@ -502,25 +502,39 @@ public class SampleDimension implements Serializable {
  *   An arbitrary amount of quantitative categories.
  * 
  *
- * A qualitative category is a range of sample values 
associated to a label (not numbers).
- * For example 0 = cloud, 1 = sea, 2 = land, etc.
- * A quantitative category is a range of sample values 
associated to numbers with units of measurement.
- * For example 10 = 1.0°C, 11 = 1.1°C, 12 = 1.2°C, etc.
- * Those three kinds of category are created by the following methods:
+ * A qualitative category is a range of sample values 
associated to a label.
+ * For example 0 = no data, 1 = cloud, 2 = sea, 3 = land, etc.
+ * Missing values are also considered as a qualitative category and should 
be declared.
+ * If the missing value can be used as a background value for filling 
empty spaces in
+ * {@linkplain org.apache.sis.image.ImageProcessor#resample image 
resampling operations},
+ * then it should be declared using {@code setBackground(…)} method 
instead of {@code addQualitative(…)}.
+ *
+ * A quantitative category is a range of sample values 
associated to numbers with units of measurement.
+ * For example 10 = 1.0°C, 11 = 1.1°C, 12 = 1.2°C, etc. A 
quantitative category has a
+ * {@linkplain 
org.opengis.metadata.content.SampleDimension#getTransferFunctionType() transfer 
function}
+ * (typically a scale factor and an offset) for converting sample values 
to values expressed
+ * in the unit of measurement.
+ *
+ * Qualitative and quantitative categories can be mixed in the same 
{@link SampleDimension},
+ * provided that their ranges do not overlap.
+ * After properties have been set, the sample dimension is created by 
invoking {@link #build()}.
+ *
+ * Note for subclass implementations
+ * Properties are ultimately set by the following methods:
  *
  * 
+ *   {@link #setName(GenericName)}
  *   {@link #setBackground(CharSequence, Number)}
  *   {@link #addQualitative(CharSequence, NumberRange)}
  *   {@link #addQuantitative(CharSequence, NumberRange, 
MathTransform1D, Unit)}
  * 
  *
- * All other {@code addQualitative(…)} and {@code addQuantitative(…)} 
methods are convenience methods delegating
- * to above-cited methods. Qualitative and quantitative categories can be 
mixed in the same {@link SampleDimension},
- * provided that their ranges do not overlap.
- * After properties have been set, the sample dimension is created by 
invoking {@link #build()}.
+ * All other {@code setName(…)}, {@code addQualitative(…)} and {@code 
addQuantitative(…)} methods
+ * are convenience methods delegating to above-cited methods, thus 
providing single points that
+ * subclasses can override.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 1.1
+ * @version 1.2
  * @since   1.0
  * @module
  */
@@ -584,24 +598,28 @@ public class SampleDimension implements Serializable {
  * Sets an identification of the sample dimension as a character 
sequence.
  * This is a convenience method for creating a {@link GenericName} 
from the given characters.
  *
+ * Implementation note:
+ * this convenience method delegates to {@link 
#setName(GenericName)}.
+ *
  * @param  name  identification of the sample dimension.
  * @return {@code this}, for method call chaining.
  */
 public Builder setName(final CharSequence name) {
-dimensionName = createLocalName(name);
-return this;
+return setName(createLocalName(name));
 }
 
 /**
  * Sets an identification of the sample dimension as a band number.
  * This method should be used only when no more descriptive name is 
available.
  *
+ * Implementation note:
+ * this convenience method delegates to {@link 
#setName(GenericName)}.
+ *
  * @param  band  sequence identifier of the sample dimension to create.
  

[sis] branch geoapi-4.0 updated (6dbc0b9 -> 3acaee5)

2021-10-14 Thread desruisseaux
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 6dbc0b9  GeoTIFF reader should declare "GDAL_NODATA" tag as the "fill 
value" of `SampleDimension`.
 new 4946333  If `GDAL_NODATA` value is 0, declare the background value 
explicitely anyway.
 new 3acaee5  Document better the use of `SampleDimension.Builder`.

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:
 .../java/org/apache/sis/coverage/CategoryList.java |  4 +-
 .../org/apache/sis/coverage/SampleDimension.java   | 46 +++---
 .../java/org/apache/sis/coverage/package-info.java |  2 +-
 .../sis/internal/geotiff/SchemaModifier.java   | 13 ++
 .../sis/storage/geotiff/ImageFileDirectory.java| 16 ++--
 5 files changed, 51 insertions(+), 30 deletions(-)