[sis] 01/02: Post-merge cleaning.

2022-05-05 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 db1dff71aa55200fa2b8ee19b0f03058725394a5
Author: Martin Desruisseaux 
AuthorDate: Thu May 5 16:41:45 2022 +0200

Post-merge cleaning.
---
 .../java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java   | 3 +--
 .../java/org/apache/sis/internal/storage/io/HyperRectangleReader.java  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
 
b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
index f3a12df41c..9e67346848 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
@@ -586,8 +586,7 @@ public final class ColorModelFactory {
  *
  * @param  cm the color model, or {@code null}.
  * @param  bands  the bands to select. Must neither be null nor empty.
- * @return the subset color model, or {@link Optional#empty() empty} if 
input was null, or a subset cannot be
- * deduced.
+ * @return the subset color model, or empty if input was null or if a 
subset cannot be deduced.
  */
 public static Optional createSubset(final ColorModel cm, final 
int[] bands) {
 assert (bands != null) && bands.length > 0 : bands;
diff --git 
a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/HyperRectangleReader.java
 
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/HyperRectangleReader.java
index 5eb18cc774..86701a7234 100644
--- 
a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/HyperRectangleReader.java
+++ 
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/HyperRectangleReader.java
@@ -42,7 +42,7 @@ import org.apache.sis.storage.DataStoreContentException;
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.2
  * @since   0.7
  * @module
  */



[sis] 02/02: Remove all usage of `java.util.security.AccessController` because this class is deprecated since Java 17. The `src/main/config/security.policy` file is deleted.

2022-05-05 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 b62ce391e5dff43e4bd04a724c68584f8b28f69f
Author: Martin Desruisseaux 
AuthorDate: Thu May 5 18:30:58 2022 +0200

Remove all usage of `java.util.security.AccessController` because this 
class is deprecated since Java 17.
The `src/main/config/security.policy` file is deleted.

https://openjdk.java.net/jeps/411
https://issues.apache.org/jira/browse/SIS-525
---
 .../java/org/apache/sis/console/package-info.java  |   2 +-
 .../sis/coverage/grid/GridCoverageProcessor.java   |   4 +-
 .../sis/internal/metadata/sql/Initializer.java |  12 +--
 .../sis/internal/metadata/sql/LocalDataSource.java |  12 +--
 .../org/apache/sis/metadata/MetadataStandard.java  |   5 +-
 .../apache/sis/geometry/GeneralDirectPosition.java |   9 +-
 .../org/apache/sis/parameter/TensorParameters.java |   5 +-
 .../referencing/factory/GeodeticObjectFactory.java |   8 +-
 .../transform/DefaultMathTransformFactory.java |   8 +-
 .../apache/sis/internal/system/DataDirectory.java  |   4 +-
 .../apache/sis/internal/util/FinalFieldSetter.java | 112 -
 .../java/org/apache/sis/measure/RangeFormat.java   |   5 +-
 .../java/org/apache/sis/measure/UnitFormat.java|   5 +-
 .../main/java/org/apache/sis/util/Exceptions.java  |   3 +-
 ide-project/NetBeans/nbproject/project.properties  |   2 -
 src/main/config/security.policy|  51 --
 16 files changed, 61 insertions(+), 186 deletions(-)

diff --git 
a/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
 
b/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
index f37551946e..a4df08cce3 100644
--- 
a/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
+++ 
b/application/sis-console/src/main/java/org/apache/sis/console/package-info.java
@@ -43,7 +43,7 @@
  * The {@code com.sun.management.jmxremote.local.only} property is recommended 
if the remote JVM is an other
  * JVM instance running on the local machine. Otherwise this property can be 
omitted for debugging purpose.
  * For production environment, see the security settings documented on the
- * http://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html;>Monitoring
+ * https://docs.oracle.com/en/java/javase/18/management/monitoring-and-management-using-jmx-technology.html;>Monitoring
  * and Management Using JMX Technology page.
  *
  * @author  Martin Desruisseaux (Geomatys)
diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageProcessor.java
 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageProcessor.java
index c631458e9b..fd4944689c 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageProcessor.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridCoverageProcessor.java
@@ -18,7 +18,6 @@ package org.apache.sis.coverage.grid;
 
 import java.awt.Shape;
 import java.util.Objects;
-import java.security.AccessController;
 import java.awt.image.RenderedImage;
 import javax.measure.Quantity;
 import org.opengis.util.FactoryException;
@@ -311,8 +310,7 @@ public class GridCoverageProcessor implements Cloneable {
 public GridCoverageProcessor clone() {
 try {
 final GridCoverageProcessor clone = (GridCoverageProcessor) 
super.clone();
-AccessController.doPrivileged(new 
FinalFieldSetter<>(GridCoverageProcessor.class, "imageProcessor"))
-.set(clone, imageProcessor.clone());
+FinalFieldSetter.set(GridCoverageProcessor.class, 
"imageProcessor", clone, imageProcessor.clone());
 return clone;
 } catch (CloneNotSupportedException e) {
 throw new AssertionError(e);
diff --git 
a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
 
b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
index d80a91e950..c3896c6b9c 100644
--- 
a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
+++ 
b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/sql/Initializer.java
@@ -22,8 +22,6 @@ import java.util.concurrent.Callable;
 import java.io.IOException;
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import javax.sql.DataSource;
 import java.sql.Connection;
 import java.sql.DatabaseMetaData;
@@ -369,15 +367,7 @@ public abstract class Initializer {
  */
 public static boolean hasJNDI() {
 return NamingManager.hasInitialContextFactoryBuilder() ||
-   AccessController.doPrivileged((PrivilegedAction) 
Initializer::isContextDefined);
-}
-
-/**
- * Returns 

[sis] branch geoapi-4.0 updated (bae538e77a -> b62ce391e5)

2022-05-05 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 bae538e77a Revert the check for EOFException. Instead, a patch is 
submitted to OpenJDK for fixing `ImageReaderSpi.canDecodeInput(Object)` 
implementations.
 new db1dff71aa Post-merge cleaning.
 new b62ce391e5 Remove all usage of `java.util.security.AccessController` 
because this class is deprecated since Java 17. The 
`src/main/config/security.policy` file is deleted.

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/console/package-info.java  |   2 +-
 .../sis/coverage/grid/GridCoverageProcessor.java   |   4 +-
 .../internal/coverage/j2d/ColorModelFactory.java   |   3 +-
 .../sis/internal/metadata/sql/Initializer.java |  12 +--
 .../sis/internal/metadata/sql/LocalDataSource.java |  12 +--
 .../org/apache/sis/metadata/MetadataStandard.java  |   5 +-
 .../apache/sis/geometry/GeneralDirectPosition.java |   9 +-
 .../org/apache/sis/parameter/TensorParameters.java |   5 +-
 .../referencing/factory/GeodeticObjectFactory.java |   8 +-
 .../transform/DefaultMathTransformFactory.java |   8 +-
 .../apache/sis/internal/system/DataDirectory.java  |   4 +-
 .../apache/sis/internal/util/FinalFieldSetter.java | 112 -
 .../java/org/apache/sis/measure/RangeFormat.java   |   5 +-
 .../java/org/apache/sis/measure/UnitFormat.java|   5 +-
 .../main/java/org/apache/sis/util/Exceptions.java  |   3 +-
 ide-project/NetBeans/nbproject/project.properties  |   2 -
 src/main/config/security.policy|  51 --
 .../internal/storage/io/HyperRectangleReader.java  |   2 +-
 18 files changed, 63 insertions(+), 189 deletions(-)
 delete mode 100644 src/main/config/security.policy



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

2022-05-05 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 e0503ad983d9a9e733b7dc8aff2c95f4db5841d9
Merge: 0beabad754 8f4b197bc6
Author: Martin Desruisseaux 
AuthorDate: Thu May 5 16:04:04 2022 +0200

Merge branch 'geoapi-3.1'

 .../org/apache/sis/metadata/sql/Dispatcher.java|   2 +-
 .../MultiResolutionCoverageLoaderTest.java |   2 +-
 .../referencing/provider/AbstractMercator.java |  12 +-
 .../referencing/provider/CassiniSoldner.java   |   9 +-
 ...Soldner.java => LambertAzimuthalEqualArea.java} | 108 ---
 .../LambertAzimuthalEqualAreaSpherical.java|  77 +
 .../provider/LambertCylindricalEqualArea.java  |   9 +-
 .../internal/referencing/provider/Mercator1SP.java |   9 +-
 .../internal/referencing/provider/Mercator2SP.java |   9 +-
 .../provider/MercatorAuxiliarySphere.java  |  85 +
 .../referencing/provider/MillerCylindrical.java|   2 +-
 .../referencing/provider/ObliqueMercator.java  |   6 +-
 .../referencing/provider/PseudoMercator.java   |   2 +-
 .../java/org/apache/sis/referencing/Builder.java   |  14 +-
 .../operation/projection/AlbersEqualArea.java  |  24 +-
 ...AreaProjection.java => AuthalicConversion.java} | 122 +---
 .../operation/projection/AuthalicMercator.java | 115 +++
 .../operation/projection/AzimuthalEquidistant.java |   6 +-
 .../operation/projection/CassiniSoldner.java   |  87 --
 .../operation/projection/ConformalProjection.java  |   8 +-
 .../operation/projection/CylindricalEqualArea.java |  79 +++--
 .../operation/projection/Initializer.java  |  42 ++-
 .../projection/LambertAzimuthalEqualArea.java  | 284 +
 .../projection/LambertConicConformal.java  |  95 +++---
 .../referencing/operation/projection/Mercator.java | 135 +---
 .../operation/projection/MeridianArcBased.java |   4 +-
 .../projection/ModifiedAzimuthalEquidistant.java   |   6 +-
 .../operation/projection/Mollweide.java|  31 +-
 .../operation/projection/NormalizedProjection.java |  95 +++---
 .../operation/projection/ObliqueMercator.java  |  80 +++--
 .../operation/projection/ObliqueStereographic.java |  10 +-
 .../operation/projection/Orthographic.java |   4 +-
 .../operation/projection/PolarStereographic.java   |  83 +++--
 .../operation/projection/Polyconic.java|   6 +-
 .../operation/projection/ProjectionVariant.java|  58 
 .../operation/projection/SatelliteTracking.java|   4 +-
 .../operation/projection/Sinusoidal.java   |   6 +-
 .../operation/projection/TransverseMercator.java   |  44 ++-
 .../operation/projection/ZonedGridSystem.java  |   2 +-
 ...g.opengis.referencing.operation.OperationMethod |   3 +
 .../referencing/provider/ProvidersTest.java|   3 +
 ...ectionTest.java => AuthalicConversionTest.java} |  24 +-
 .../operation/projection/InitializerTest.java  |   2 +-
 .../projection/LambertAzimuthalEqualAreaTest.java  | 344 +
 .../operation/projection/MercatorTest.java |  72 -
 .../sis/referencing/operation/projection/NoOp.java |   4 +-
 .../projection/ProjectionResultComparator.java |   2 +-
 .../sis/test/suite/ReferencingTestSuite.java   |   3 +-
 .../org/apache/sis/storage/landsat/BandGroup.java  |   2 +-
 .../sis/internal/netcdf/DiscreteSampling.java  |   2 +-
 .../apache/sis/internal/netcdf/RasterResource.java |   2 +-
 .../org/apache/sis/internal/netcdf/TestCase.java   |   2 +-
 .../org/apache/sis/internal/sql/feature/Table.java |   4 +-
 .../sis/internal/storage/AggregatedFeatureSet.java |   2 +-
 .../sis/internal/storage/MemoryFeatureSet.java |   4 +-
 .../sis/internal/storage/MemoryGridResource.java   |   2 +-
 .../sis/internal/storage/TiledGridResource.java|   2 +-
 .../org/apache/sis/internal/storage/csv/Store.java |   6 +-
 .../sis/internal/storage/image/FormatFilter.java   |  23 +-
 .../sis/internal/storage/image/FormatFinder.java   | 288 +
 .../internal/storage/image/MultiImageStore.java|  62 
 .../internal/storage/image/SingleImageStore.java   | 191 
 .../internal/storage/image/WorldFileResource.java  |  16 +-
 .../sis/internal/storage/image/WorldFileStore.java | 116 +++
 .../storage/image/WorldFileStoreProvider.java  |  67 +++-
 .../sis/internal/storage/image/WritableStore.java  |  81 ++---
 .../sis/internal/storage/io/ChannelData.java   |   2 +
 .../storage/io/ChannelImageInputStream.java|  31 +-
 .../org/apache/sis/storage/AbstractFeatureSet.java |  20 +-
 .../sis/storage/AbstractGridCoverageResource.java  |  20 +-
 .../org/apache/sis/storage/AbstractResource.java   |  24 +-
 .../org/apache/sis/storage/CoverageSubset.java |   2 +-
 .../java/org/apache/sis/storage/DataStore.java |   2 +-
 .../java/org/apache/sis/storage/FeatureNaming.java |   1 +
 

[sis] branch master updated (0beabad754 -> e0503ad983)

2022-05-05 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 0beabad754 Merge branch 'geoapi-3.1'
 add fa0f89c70f Post-merge cleanup.
 add eb41db63c4 Post-merge cleanup.
 add 49ceb86450 Replace the way variants of map projections are 
represented, using enumeration instead of a single integer. This change makes 
possible to attach more information to the enumeration value. This is a step 
for making easier to add support for variants such as "Mercator Auxiliary 
Sphere".
 add d5b9780190 Reduce the use of `null` as an enumeration value.
 add 4a0ed7a1a3 Add a test case for "Mercator Auxiliary Sphere".
 add c8ed9467ae Port `LambertAzimuthalEqualArea` from Geotk. We rewrote the 
equations from EPSG guidance notes.
 add 200602de57 Make the `qm(sinφ)` method always safe to the spherical 
case. The reason is because `Spherical` inner classes are not public. 
Consequently users creating their own map projection subclasses could have a 
non-working instance.
 add f70bb327ff Before to replace a map projection by a spherical 
optimization, verify if it is safe to do so. If user created a subclasses, we 
should not do such replacement because it would ignore user's code.
 add a39fb97d1c Javadoc updates.
 add b318c2161a Rename `EqualAreaProjection` as `AuthalicConversion`.
 add 4581391386 Slight modification of `AuthalicConversion` parameters for 
making clearer that this is a conversion between geodetic latitude φ and 
authalic latitude β.
 add 8b97aed4cc Fix the unicode character for Greek Beta letter.
 add c01dd455bb Implement ESRI "Mercator Auxiliary Sphere" type 3 (with 
conversion of geodetic latitudes to authalic latitudes). This feature requires 
an additional degree of flexibility in the package-private projection 
constructors.
 add 9a87ff27c0 `skipBytes` method implementation should skip all specified 
bytes when possible, because some `ImageReader` implementation don't check the 
return value.
 add 8a881f42c4 Leverage more a simple helper method for getting the 
filename without suffix.
 add 6b8b00c6a2 Add a boolean argument to `AbstractResource` for making 
possible to use the parent listeners directly. The use case for direct use is 
when the resource is only a proxy for a "real" resource.
 add 9e5697263d If the World File uses a format which is known to support 
only one image (PNG, BMP, WBMP and maybe JPEG), returns a data store which 
implements directly `GridCoverageResource` instead of `Aggregate`.
 add 229d919d7e Add a safety against `ImageReader` implementations that do 
not check if there is enough bytes in the stream.
 add bae538e77a Revert the check for EOFException. Instead, a patch is 
submitted to OpenJDK for fixing `ImageReaderSpi.canDecodeInput(Object)` 
implementations.
 add 8f4b197bc6 Merge branch 'geoapi-4.0' into geoapi-3.1. Includes new map 
projection and improvements on World File data store.
 new e0503ad983 Merge branch '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:
 .../org/apache/sis/metadata/sql/Dispatcher.java|   2 +-
 .../MultiResolutionCoverageLoaderTest.java |   2 +-
 .../referencing/provider/AbstractMercator.java |  12 +-
 .../referencing/provider/CassiniSoldner.java   |   9 +-
 ...lyconic.java => LambertAzimuthalEqualArea.java} |  87 --
 ...ava => LambertAzimuthalEqualAreaSpherical.java} |  39 ++-
 .../provider/LambertCylindricalEqualArea.java  |   9 +-
 .../internal/referencing/provider/Mercator1SP.java |   9 +-
 .../internal/referencing/provider/Mercator2SP.java |   9 +-
 .../provider/MercatorAuxiliarySphere.java  |  85 +
 .../referencing/provider/MillerCylindrical.java|   2 +-
 .../referencing/provider/ObliqueMercator.java  |   6 +-
 .../referencing/provider/PseudoMercator.java   |   2 +-
 .../java/org/apache/sis/referencing/Builder.java   |  14 +-
 .../operation/projection/AlbersEqualArea.java  |  24 +-
 ...AreaProjection.java => AuthalicConversion.java} | 122 +---
 .../operation/projection/AuthalicMercator.java | 115 +++
 .../operation/projection/AzimuthalEquidistant.java |   6 +-
 .../operation/projection/CassiniSoldner.java   |  87 --
 .../operation/projection/ConformalProjection.java  |   8 +-
 .../operation/projection/CylindricalEqualArea.java |  79 +++--
 .../operation/projection/Initializer.java  |  42 ++-
 .../projection/LambertAzimuthalEqualArea.java  | 284 +
 .../projection/LambertConicConformal.java  |  95 +++---
 .../referencing/operation/projection/Mercator.java | 135 +---
 .../operation/projection/MeridianArcBased.java 

[sis] 02/02: Merge branch 'geoapi-4.0' into geoapi-3.1. Includes new map projection and improvements on World File data store.

2022-05-05 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 8f4b197bc60594381cc16e5d941242c81ed8a965
Merge: fa0f89c70f bae538e77a
Author: Martin Desruisseaux 
AuthorDate: Thu May 5 15:43:59 2022 +0200

Merge branch 'geoapi-4.0' into geoapi-3.1.
Includes new map projection and improvements on World File data store.

 .../MultiResolutionCoverageLoaderTest.java |   2 +-
 .../referencing/provider/AbstractMercator.java |  12 +-
 .../referencing/provider/CassiniSoldner.java   |   9 +-
 ...Soldner.java => LambertAzimuthalEqualArea.java} | 108 ---
 .../LambertAzimuthalEqualAreaSpherical.java|  77 +
 .../provider/LambertCylindricalEqualArea.java  |   9 +-
 .../internal/referencing/provider/Mercator1SP.java |   9 +-
 .../internal/referencing/provider/Mercator2SP.java |   9 +-
 .../provider/MercatorAuxiliarySphere.java  |  85 +
 .../referencing/provider/MillerCylindrical.java|   2 +-
 .../referencing/provider/ObliqueMercator.java  |   6 +-
 .../referencing/provider/PseudoMercator.java   |   2 +-
 .../java/org/apache/sis/referencing/Builder.java   |  14 +-
 .../operation/projection/AlbersEqualArea.java  |  24 +-
 ...AreaProjection.java => AuthalicConversion.java} | 122 ---
 .../operation/projection/AuthalicMercator.java | 115 +++
 .../operation/projection/AzimuthalEquidistant.java |   6 +-
 .../operation/projection/CassiniSoldner.java   |  87 +++--
 .../operation/projection/ConformalProjection.java  |   8 +-
 .../operation/projection/CylindricalEqualArea.java |  79 +++--
 .../operation/projection/Initializer.java  |  42 ++-
 .../projection/LambertAzimuthalEqualArea.java  | 284 
 .../projection/LambertConicConformal.java  |  95 +++---
 .../referencing/operation/projection/Mercator.java | 135 +---
 .../operation/projection/MeridianArcBased.java |   4 +-
 .../projection/ModifiedAzimuthalEquidistant.java   |   6 +-
 .../operation/projection/Mollweide.java|  31 +-
 .../operation/projection/NormalizedProjection.java |  95 +++---
 .../operation/projection/ObliqueMercator.java  |  80 +++--
 .../operation/projection/ObliqueStereographic.java |  10 +-
 .../operation/projection/Orthographic.java |   4 +-
 .../operation/projection/PolarStereographic.java   |  83 +++--
 .../operation/projection/Polyconic.java|   6 +-
 .../operation/projection/ProjectionVariant.java|  58 
 .../operation/projection/SatelliteTracking.java|   4 +-
 .../operation/projection/Sinusoidal.java   |   6 +-
 .../operation/projection/TransverseMercator.java   |  44 ++-
 .../operation/projection/ZonedGridSystem.java  |   2 +-
 ...g.opengis.referencing.operation.OperationMethod |   3 +
 .../referencing/provider/ProvidersTest.java|   3 +
 ...ectionTest.java => AuthalicConversionTest.java} |  24 +-
 .../operation/projection/InitializerTest.java  |   2 +-
 .../projection/LambertAzimuthalEqualAreaTest.java  | 357 +
 .../operation/projection/MercatorTest.java |  72 -
 .../sis/referencing/operation/projection/NoOp.java |   4 +-
 .../projection/ProjectionResultComparator.java |   2 +-
 .../sis/test/suite/ReferencingTestSuite.java   |   3 +-
 .../org/apache/sis/storage/landsat/BandGroup.java  |   2 +-
 .../sis/storage/landsat/MetadataReaderTest.java|   2 +-
 .../sis/internal/netcdf/DiscreteSampling.java  |   2 +-
 .../apache/sis/internal/netcdf/RasterResource.java |   2 +-
 .../org/apache/sis/internal/netcdf/TestCase.java   |   2 +-
 .../org/apache/sis/internal/sql/feature/Table.java |   4 +-
 .../sis/internal/storage/AggregatedFeatureSet.java |   2 +-
 .../sis/internal/storage/MemoryFeatureSet.java |   2 +-
 .../sis/internal/storage/MemoryGridResource.java   |   2 +-
 .../sis/internal/storage/TiledGridResource.java|   2 +-
 .../org/apache/sis/internal/storage/csv/Store.java |   6 +-
 .../sis/internal/storage/image/FormatFilter.java   |  23 +-
 .../sis/internal/storage/image/FormatFinder.java   | 288 +
 .../internal/storage/image/MultiImageStore.java|  62 
 .../internal/storage/image/SingleImageStore.java   | 191 +++
 .../internal/storage/image/WorldFileResource.java  |  16 +-
 .../sis/internal/storage/image/WorldFileStore.java | 116 +++
 .../storage/image/WorldFileStoreProvider.java  |  67 +++-
 .../sis/internal/storage/image/WritableStore.java  |  81 ++---
 .../sis/internal/storage/io/ChannelData.java   |   2 +
 .../storage/io/ChannelImageInputStream.java|  31 +-
 .../org/apache/sis/storage/AbstractFeatureSet.java |  20 +-
 .../sis/storage/AbstractGridCoverageResource.java  |  20 +-
 .../org/apache/sis/storage/AbstractResource.java   |  24 +-
 .../org/apache/sis/storage/CoverageSubset.java |   2 +-
 

[sis] 01/02: Post-merge cleanup.

2022-05-05 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 fa0f89c70f5bba5d7dce0f7a69a969ec3e33f8c9
Author: Martin Desruisseaux 
AuthorDate: Tue Apr 26 18:26:42 2022 +0200

Post-merge cleanup.
---
 .../src/main/java/org/apache/sis/metadata/sql/Dispatcher.java | 2 +-
 .../main/java/org/apache/sis/internal/storage/esri/WritableStore.java | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/Dispatcher.java 
b/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/Dispatcher.java
index adb318d941..13e06a9ab9 100644
--- 
a/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/Dispatcher.java
+++ 
b/core/sis-metadata/src/main/java/org/apache/sis/metadata/sql/Dispatcher.java
@@ -336,7 +336,7 @@ final class Dispatcher implements InvocationHandler {
 } else {
 /*
  * `getIndividualName()`, `getOrganisationName()`, 
`getPositionName()` and
- * `getContactInfo()` has no direct equivalence in 
`Responsibility` class.
+ * `getContactInfo()` have no direct equivalence in 
`Responsibility` class.
  */
 return null;
 }
diff --git 
a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/esri/WritableStore.java
 
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/esri/WritableStore.java
index 5e57c11003..1b51c553c2 100644
--- 
a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/esri/WritableStore.java
+++ 
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/esri/WritableStore.java
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.awt.image.DataBuffer;
 import java.awt.image.RenderedImage;
 import java.awt.geom.AffineTransform;
-import org.opengis.coverage.grid.SequenceType;
 import org.opengis.referencing.datum.PixelInCell;
 import org.opengis.referencing.operation.Matrix;
 import org.opengis.referencing.operation.MathTransform;
@@ -42,6 +41,9 @@ import org.apache.sis.image.PixelIterator;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.StringBuilders;
 
+// Branch-dependent imports
+import org.opengis.coverage.grid.SequenceType;
+
 
 /**
  * An ASCII Grid store with writing capabilities.



[sis] branch geoapi-3.1 updated (15f1d671c9 -> 8f4b197bc6)

2022-05-05 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 15f1d671c9 Merge branch 'geoapi-4.0' into geoapi-3.1
 new fa0f89c70f Post-merge cleanup.
 add eb41db63c4 Post-merge cleanup.
 add 49ceb86450 Replace the way variants of map projections are 
represented, using enumeration instead of a single integer. This change makes 
possible to attach more information to the enumeration value. This is a step 
for making easier to add support for variants such as "Mercator Auxiliary 
Sphere".
 add d5b9780190 Reduce the use of `null` as an enumeration value.
 add 4a0ed7a1a3 Add a test case for "Mercator Auxiliary Sphere".
 add c8ed9467ae Port `LambertAzimuthalEqualArea` from Geotk. We rewrote the 
equations from EPSG guidance notes.
 add 200602de57 Make the `qm(sinφ)` method always safe to the spherical 
case. The reason is because `Spherical` inner classes are not public. 
Consequently users creating their own map projection subclasses could have a 
non-working instance.
 add f70bb327ff Before to replace a map projection by a spherical 
optimization, verify if it is safe to do so. If user created a subclasses, we 
should not do such replacement because it would ignore user's code.
 add a39fb97d1c Javadoc updates.
 add b318c2161a Rename `EqualAreaProjection` as `AuthalicConversion`.
 add 4581391386 Slight modification of `AuthalicConversion` parameters for 
making clearer that this is a conversion between geodetic latitude φ and 
authalic latitude β.
 add 8b97aed4cc Fix the unicode character for Greek Beta letter.
 add c01dd455bb Implement ESRI "Mercator Auxiliary Sphere" type 3 (with 
conversion of geodetic latitudes to authalic latitudes). This feature requires 
an additional degree of flexibility in the package-private projection 
constructors.
 add 9a87ff27c0 `skipBytes` method implementation should skip all specified 
bytes when possible, because some `ImageReader` implementation don't check the 
return value.
 add 8a881f42c4 Leverage more a simple helper method for getting the 
filename without suffix.
 add 6b8b00c6a2 Add a boolean argument to `AbstractResource` for making 
possible to use the parent listeners directly. The use case for direct use is 
when the resource is only a proxy for a "real" resource.
 add 9e5697263d If the World File uses a format which is known to support 
only one image (PNG, BMP, WBMP and maybe JPEG), returns a data store which 
implements directly `GridCoverageResource` instead of `Aggregate`.
 add 229d919d7e Add a safety against `ImageReader` implementations that do 
not check if there is enough bytes in the stream.
 add bae538e77a Revert the check for EOFException. Instead, a patch is 
submitted to OpenJDK for fixing `ImageReaderSpi.canDecodeInput(Object)` 
implementations.
 new 8f4b197bc6 Merge branch 'geoapi-4.0' into geoapi-3.1. Includes new map 
projection and improvements on World File data store.

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:
 .../org/apache/sis/metadata/sql/Dispatcher.java|   2 +-
 .../MultiResolutionCoverageLoaderTest.java |   2 +-
 .../referencing/provider/AbstractMercator.java |  12 +-
 .../referencing/provider/CassiniSoldner.java   |   9 +-
 ...lyconic.java => LambertAzimuthalEqualArea.java} |  87 +++--
 ...ava => LambertAzimuthalEqualAreaSpherical.java} |  39 ++-
 .../provider/LambertCylindricalEqualArea.java  |   9 +-
 .../internal/referencing/provider/Mercator1SP.java |   9 +-
 .../internal/referencing/provider/Mercator2SP.java |   9 +-
 .../provider/MercatorAuxiliarySphere.java  |  85 +
 .../referencing/provider/MillerCylindrical.java|   2 +-
 .../referencing/provider/ObliqueMercator.java  |   6 +-
 .../referencing/provider/PseudoMercator.java   |   2 +-
 .../java/org/apache/sis/referencing/Builder.java   |  14 +-
 .../operation/projection/AlbersEqualArea.java  |  24 +-
 ...AreaProjection.java => AuthalicConversion.java} | 122 ---
 .../operation/projection/AuthalicMercator.java | 115 +++
 .../operation/projection/AzimuthalEquidistant.java |   6 +-
 .../operation/projection/CassiniSoldner.java   |  87 +++--
 .../operation/projection/ConformalProjection.java  |   8 +-
 .../operation/projection/CylindricalEqualArea.java |  79 +++--
 .../operation/projection/Initializer.java  |  42 ++-
 .../projection/LambertAzimuthalEqualArea.java  | 284 
 .../projection/LambertConicConformal.java  |  95 +++---
 .../referencing/operation/projection/Mercator.java | 135 +---
 .../operation/projection/MeridianArcBased.java |   4 +-
 

[sis] branch geoapi-4.0 updated: Revert the check for EOFException. Instead, a patch is submitted to OpenJDK for fixing `ImageReaderSpi.canDecodeInput(Object)` implementations.

2022-05-05 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 bae538e77a Revert the check for EOFException. Instead, a patch is 
submitted to OpenJDK for fixing `ImageReaderSpi.canDecodeInput(Object)` 
implementations.
bae538e77a is described below

commit bae538e77aa28b36296e1eaac965ae9de7779c53
Author: Martin Desruisseaux 
AuthorDate: Thu May 5 12:51:56 2022 +0200

Revert the check for EOFException. Instead, a patch is submitted to OpenJDK 
for fixing `ImageReaderSpi.canDecodeInput(Object)` implementations.
---
 .../sis/internal/storage/image/FormatFilter.java   | 22 +-
 1 file changed, 5 insertions(+), 17 deletions(-)

diff --git 
a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/image/FormatFilter.java
 
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/image/FormatFilter.java
index 2b683074dd..8d7bc23350 100644
--- 
a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/image/FormatFilter.java
+++ 
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/image/FormatFilter.java
@@ -28,7 +28,6 @@ import java.io.DataOutput;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.IOException;
-import java.io.EOFException;
 import java.nio.file.Path;
 import java.awt.image.RenderedImage;
 import javax.imageio.ImageReader;
@@ -39,7 +38,6 @@ import javax.imageio.spi.ImageWriterSpi;
 import javax.imageio.spi.ImageReaderWriterSpi;
 import javax.imageio.stream.ImageInputStream;
 import javax.imageio.stream.ImageOutputStream;
-import org.apache.sis.internal.storage.io.ChannelDataInput;
 import org.apache.sis.storage.StorageConnector;
 import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.util.ArraysExt;
@@ -145,30 +143,20 @@ enum FormatFilter {
 for (final Class type : provider.getInputTypes()) {
 if (ArraysExt.contains(VALID_INPUTS, type)) {
 final Object input = connector.getStorageAs(type);
-final long origin;
-if (input instanceof ChannelDataInput) {
-origin = ((ChannelDataInput) 
input).getStreamPosition();
-} else {
-origin = -1;
-}
-if (input != null) try {
+if (input != null) {
 /*
  * We do not try to mark/reset the input because 
it should be done
  * by `canDecodeInput(…)` as per Image I/O 
contract. Doing our own
  * mark/reset may interfere with the 
`canDecodeInput(…)` marks.
+ *
+ * Note: `ImageReaderSpi` implementations in Java 
18 read up to 8 bytes
+ * without verifying if those bytes exist. 
Consequently there is a risk
+ * of `EOFException` here. A patch has been 
submitted to OpenJDK.
  */
 if (provider.canDecodeInput(input)) {
 return provider;
 }
 break;  // Skip other input types, try the 
next provider.
-} catch (EOFException e) {
-/*
- * Not all `ImageReader` implementations verify 
that there is enough bytes in the stream.
- * If the stream was our `ChannelDataInput` 
implementation, we know that we can recover.
- * Otherwise conservatively let the exception 
propagate.
- */
-if (origin < 0) throw e;
-((ChannelDataInput) input).seek(origin);
 }
 }
 }