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

2023-01-17 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 7598ed90ea75f420a113eaf91339e8dfd8c12e8c
Merge: 668c1d28b5 0a621ef6cf
Author: Martin Desruisseaux 
AuthorDate: Tue Jan 17 19:02:48 2023 +0100

Merge branch 'geoapi-3.1'.

 .../sis/referencing/factory/sql/EPSGDataAccess.java   | 13 +
 .../apache/sis/util/resources/IndexedResourceBundle.java  | 15 +--
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --cc 
core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
index 90d48cc466,03c87279d1..75aa31a119
--- 
a/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
+++ 
b/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
@@@ -423,16 -425,12 +424,12 @@@ public class IndexedResourceBundle exte
  text = ((InternationalString) 
element).toString(getLocale());
  }
  replacement = CharSequences.shortSentence(text, 
MAX_STRING_LENGTH);
- } else if (element instanceof Throwable) {
- String message = Exceptions.getLocalizedMessage((Throwable) 
element, getLocale());
- if (message == null) {
- message = Classes.getShortClassName(element);
- }
- replacement = message;
+ } else if (element instanceof URI) {
+ replacement = ((URI) element).getPath();// For 
decoding encoded characters.
  } else if (element instanceof Class) {
  replacement = Classes.getShortName(getPublicType((Class) 
element));
 -} else if (element instanceof ControlledVocabulary) {
 -replacement = 
MetadataServices.getInstance().getCodeTitle((ControlledVocabulary) element, 
getLocale());
 +} else if (element instanceof CodeList) {
 +replacement = 
MetadataServices.getInstance().getCodeTitle((CodeList) element, getLocale());
  } else if (element instanceof Range) {
  final Range range = (Range) element;
  replacement = new RangeFormat(getLocale(), 
range.getElementType()).format(range);



[sis] branch master updated (668c1d28b5 -> 7598ed90ea)

2023-01-17 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 668c1d28b5 Disable the use of FMA on the master branch for 
`MathTransform.transform(…)` methods. FMA stay enabled on the geoapi-4.0 
development branch.
 add 186c01efb9 Handle characters for the "File reference" column of EPSG 
database that are illegal according URI syntax.
 add 0a621ef6cf Merge branch 'geoapi-4.0' into geoapi-3.1. It fixes a bug 
introduced by the replacement of `Path` by `URI` in coordinate operation 
parameters.
 new 7598ed90ea 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:
 .../sis/referencing/factory/sql/EPSGDataAccess.java   | 13 +
 .../apache/sis/util/resources/IndexedResourceBundle.java  | 15 +--
 2 files changed, 18 insertions(+), 10 deletions(-)



[sis] branch geoapi-3.1 updated (bece843ce4 -> 0a621ef6cf)

2023-01-17 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 bece843ce4 Merge branch 'geoapi-4.0' into geoapi-3.1. Contains cleanup 
on serialization, loggers, rounding errors (again), javadoc.
 add 186c01efb9 Handle characters for the "File reference" column of EPSG 
database that are illegal according URI syntax.
 new 0a621ef6cf Merge branch 'geoapi-4.0' into geoapi-3.1. It fixes a bug 
introduced by the replacement of `Path` by `URI` in coordinate operation 
parameters.

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:
 .../sis/referencing/factory/sql/EPSGDataAccess.java   | 13 +
 .../apache/sis/util/resources/IndexedResourceBundle.java  | 15 +--
 ide-project/NetBeans/nbproject/genfiles.properties|  4 ++--
 3 files changed, 20 insertions(+), 12 deletions(-)



[sis] branch geoapi-4.0 updated (8566937622 -> 186c01efb9)

2023-01-17 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 8566937622 Use static constants for most (not all) loggers.
 add 3014fe6003 Opportunistically use the division by `w` in 
ProjectiveTransform for reducing rounding errors with fractional matrix element 
values.
 new 186c01efb9 Handle characters for the "File reference" column of EPSG 
database that are illegal according URI syntax.

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:
 .../referencing/factory/sql/EPSGDataAccess.java|  13 +-
 .../transform/AbstractLinearTransform.java |   4 +-
 .../operation/transform/ProjectiveTransform.java   | 221 -
 .../transform/ProjectiveTransformTest.java |  12 ++
 .../sis/util/resources/IndexedResourceBundle.java  |  15 +-
 5 files changed, 200 insertions(+), 65 deletions(-)



[sis] 01/01: Handle characters for the "File reference" column of EPSG database that are illegal according URI syntax.

2023-01-17 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 186c01efb99922d744fc6c925b58c940b6e7ab04
Author: Martin Desruisseaux 
AuthorDate: Tue Jan 17 18:55:34 2023 +0100

Handle characters for the "File reference" column of EPSG database that are 
illegal according URI syntax.
---
 .../sis/referencing/factory/sql/EPSGDataAccess.java   | 13 +
 .../apache/sis/util/resources/IndexedResourceBundle.java  | 15 +--
 2 files changed, 18 insertions(+), 10 deletions(-)

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 46658ed855..aa33a6cbf6 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
@@ -2728,8 +2728,12 @@ next:   while (r.next()) {
 String reference;
 if (Double.isNaN(value)) {
 /*
- * If no numeric values were provided in the database, 
then the values should be
- * in some external file. It may be a file in the 
$SIS_DATA/DatumChanges directory.
+ * If no numeric value was provided in the database, then 
the values should be in
+ * an external file. It may be a file in the 
"$SIS_DATA/DatumChanges" directory.
+ * The reference file should be relative and _not_ encoded 
for valid URI syntax.
+ * The encoding will be applied by invoking an `URI` 
multi-argument constructor.
+ * Note that we must use a multi-arguments constructor, 
not URI(String), because
+ * the latter assumes an encoded string (which is not the 
case in EPSG database).
  */
 reference = getString(operation, result, 3);
 } else {
@@ -2744,13 +2748,14 @@ next:   while (r.next()) {
 }
 try {
 if (reference != null) {
-param.setValue(reference);
+param.setValue(new URI(null, reference, null)); // 
See above comment.
 } else if (unit != null) {
 param.setValue(value, unit);
 } else {
 param.setValue(value);
 }
-} catch (RuntimeException exception) {  // Catch 
InvalidParameterValueException, ArithmeticException and others.
+} catch (RuntimeException | URISyntaxException exception) {
+// Catch InvalidParameterValueException, 
ArithmeticException and others.
 throw new 
FactoryDataException(error().getString(Errors.Keys.CanNotSetParameterValue_1, 
name), exception);
 }
 }
diff --git 
a/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
 
b/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
index ef618c53a4..03c87279d1 100644
--- 
a/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
+++ 
b/core/sis-utility/src/main/java/org/apache/sis/util/resources/IndexedResourceBundle.java
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.util.resources;
 
+import java.net.URI;
 import java.net.URL;
 import java.io.BufferedInputStream;
 import java.io.DataInputStream;
@@ -424,12 +425,8 @@ public class IndexedResourceBundle extends ResourceBundle 
implements Localized {
 text = ((InternationalString) 
element).toString(getLocale());
 }
 replacement = CharSequences.shortSentence(text, 
MAX_STRING_LENGTH);
-} else if (element instanceof Throwable) {
-String message = Exceptions.getLocalizedMessage((Throwable) 
element, getLocale());
-if (message == null) {
-message = Classes.getShortClassName(element);
-}
-replacement = message;
+} else if (element instanceof URI) {
+replacement = ((URI) element).getPath();// For 
decoding encoded characters.
 } else if (element instanceof Class) {
 replacement = Classes.getShortName(getPublicType((Class) 
element));
 } else if (element instanceof ControlledVocabulary) {
@@ -443,6 +440,12 @@ public class IndexedResourceBundle extends ResourceBundle 
implements Localized {
 replacement = s;
 } else if (element.getClass().isArray()) {
 replacement = Utilities.deepToString(element);
+ 

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

2023-01-17 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 30388c561a5a15137bf53c1537db0eba0844f319
Merge: 835b893740 bece843ce4
Author: Martin Desruisseaux 
AuthorDate: Tue Jan 17 15:49:25 2023 +0100

Merge branch 'geoapi-3.1'

 .../java/org/apache/sis/console/AboutCommand.java  |   4 +-
 .../java/org/apache/sis/console/package-info.java  |   2 +-
 .../main/java/org/apache/sis/gui/RecentFiles.java  |  14 +-
 .../apache/sis/gui/coverage/CoverageCanvas.java|   7 +-
 .../apache/sis/gui/coverage/GridSliceSelector.java |   8 +-
 .../org/apache/sis/gui/dataset/FeatureLoader.java  |   2 +
 .../org/apache/sis/gui/dataset/FeatureTable.java   |   9 +-
 .../org/apache/sis/gui/dataset/PathAction.java |  12 +-
 .../org/apache/sis/gui/dataset/ResourceCell.java   |   4 +-
 .../org/apache/sis/gui/dataset/ResourceEvent.java  |  33 +-
 .../org/apache/sis/gui/dataset/ResourceTree.java   |   9 +-
 .../org/apache/sis/gui/dataset/WindowHandler.java  |   8 +-
 .../org/apache/sis/gui/dataset/package-info.java   |   2 +-
 .../org/apache/sis/gui/map/GestureFollower.java|   8 +-
 .../java/org/apache/sis/gui/map/MapCanvas.java |   7 +-
 .../java/org/apache/sis/gui/map/MapCanvasAWT.java  |   3 +
 .../org/apache/sis/gui/map/OperationFinder.java|   7 +-
 .../java/org/apache/sis/gui/map/StatusBar.java |   6 +-
 .../org/apache/sis/gui/map/ValuesFormatter.java|   7 +-
 .../org/apache/sis/gui/metadata/MetadataTree.java  |   7 +-
 .../org/apache/sis/gui/metadata/package-info.java  |   2 +-
 .../apache/sis/gui/referencing/AuthorityCodes.java |   7 +-
 .../gui/referencing/PositionableProjection.java|   8 +-
 .../gui/referencing/RecentReferenceSystems.java|   7 +-
 .../java/org/apache/sis/gui/referencing/Utils.java |   7 +-
 .../apache/sis/internal/gui/BackgroundThreads.java |   7 +-
 .../apache/sis/internal/gui/ImageConverter.java|   7 +-
 .../org/apache/sis/internal/gui/LogHandler.java|  10 +-
 .../org/apache/sis/internal/gui/RecentChoices.java |   2 +
 .../java/org/apache/sis/internal/gui/Styles.java   |   7 +-
 .../apache/sis/internal/gui/control/ColorCell.java |   6 +-
 .../org/apache/sis/internal/gui/package-info.java  |   2 +-
 .../org/apache/sis/coverage/SampleRangeFormat.java |   2 +
 .../coverage/grid/CoordinateOperationFinder.java   |   7 +-
 .../apache/sis/coverage/grid/DefaultEvaluator.java |   7 +-
 .../sis/coverage/grid/GridCoverageProcessor.java   |   7 +-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  11 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |   4 +-
 .../apache/sis/feature/AbstractIdentifiedType.java |   9 +-
 .../java/org/apache/sis/feature/FeatureFormat.java |   7 +-
 .../java/org/apache/sis/feature/package-info.java  |   2 +-
 .../apache/sis/image/BandedSampleConverter.java|   7 +-
 .../java/org/apache/sis/image/ErrorAction.java |  13 +-
 .../main/java/org/apache/sis/image/MaskImage.java  |   7 +-
 .../java/org/apache/sis/image/ResampledImage.java  |   7 +-
 .../java/org/apache/sis/image/ResamplingGrid.java  |   2 +
 .../java/org/apache/sis/image/package-info.java|   2 +-
 .../sis/internal/coverage/j2d/ImageLayout.java |   4 +
 .../sis/internal/coverage/j2d/ImageUtilities.java  |  15 +-
 .../apache/sis/internal/feature/Geometries.java|   9 +-
 .../sis/internal/feature/GeometryFactories.java|   6 +-
 .../org/apache/sis/internal/feature/jts/JTS.java   |   7 +-
 .../sis/internal/feature/jts/package-info.java |   2 +-
 .../apache/sis/internal/feature/package-info.java  |   2 +-
 .../java/org/apache/sis/internal/filter/Node.java  |  12 +-
 .../internal/filter/sqlmm/RegistryTestCase.java|   8 +-
 .../apache/sis/internal/metadata/Dependencies.java |   3 +-
 .../sis/internal/metadata/ServicesForUtility.java  |   8 +-
 .../internal/metadata/legacy/DateToTemporal.java   |  25 +-
 .../internal/metadata/legacy/TemporalToDate.java   |  25 +-
 .../sis/internal/metadata/legacy/package-info.java |   2 +-
 .../sis/internal/metadata/sql/Initializer.java |  32 +-
 .../sis/internal/metadata/sql/LocalDataSource.java |  14 +-
 .../sis/internal/metadata/sql/package-info.java|   2 +-
 .../sis/internal/simple/CitationConstant.java  |  12 +-
 .../apache/sis/internal/simple/package-info.java   |   2 +-
 .../org/apache/sis/metadata/AbstractMetadata.java  |   4 +-
 .../org/apache/sis/metadata/MetadataStandard.java  |   2 +
 .../apache/sis/metadata/PropertyInformation.java   |  11 +-
 .../sis/metadata/StandardImplementation.java   |  16 +-
 .../org/apache/sis/metadata/TreeNodeChildren.java  |   4 +-
 .../java/org/apache/sis/metadata/package-info.java |   2 +-
 .../apache/sis/metadata/sql/MetadataSource.java|  10 +-
 .../org/apache/sis/metadata/sql/package-info.java  |   2 +-
 .../main/java/org/apache/sis/util/iso/Types.java   |  18 +-
 .../main/java/org/apache/sis/xml/LegacyCodes.java  |   2 +-
 

[sis] 02/02: Disable the use of FMA on the master branch for `MathTransform.transform(…)` methods. FMA stay enabled on the geoapi-4.0 development branch.

2023-01-17 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 668c1d28b55766371eb5210fc1abcbe68852fd3a
Author: Martin Desruisseaux 
AuthorDate: Tue Jan 17 15:53:20 2023 +0100

Disable the use of FMA on the master branch for 
`MathTransform.transform(…)` methods.
FMA stay enabled on the geoapi-4.0 development branch.

The reason for disabling FMA is that they provide a slight performance 
increase on processors
that support it, but a big performance penality on processors that do not 
support it.
FMA may be considered common enough if the future, when `geoapi-3.1` will 
become `main`.
---
 .../src/main/java/org/apache/sis/internal/referencing/Formulas.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
 
b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
index 538cb09cc6..89c7837181 100644
--- 
a/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
+++ 
b/core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/Formulas.java
@@ -110,7 +110,7 @@ public final class Formulas extends Static {
  * but come at a high cost on older machines without hardware support.
  */
 @Configuration
-public static final boolean USE_FMA = true;
+public static final boolean USE_FMA = false;
 
 /**
  * Do not allow instantiation of this class.



[sis] branch master updated (835b893740 -> 668c1d28b5)

2023-01-17 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 835b893740 Merge branch 'geoapi-3.1'.
 add ae61bb0a20 Add missing `equals` and `hashCode` method on a legacy 
metadata property.
 add 8881e88be3 Disable some GIGS tests that are known to fail. 
https://gigs.iogp.org/
 add 0f46e213f3 More advanced test for rounding errors.
 add 8991c55d92 Replace `Path` parameter value by `URI` in operation 
methods using datum shift grids.
 add 8eceb4133a Replace `Path` by `File` in `ResourceEvent` for resolving 
serialization warning. The `File` object was what we needed for storing in 
`RecentFiles` anyway. Opportunistic documentation cleanup.
 add f8afbbfd5b Document `StandardDateFormat` as not intended for 
serialization. We verified that it was not used as non-transient field in a 
serialiable class.
 add c288461503 Consolidate the constants for `ByteBuffer` capacity and 
increase the default capacity from 8 kb to 16 kb.
 add 47e5b43141 Replace some  by  or  headings. This is a 
change in javadoc formatting only.
 add 9f079c7e51 Move the `Configuration` annotation to internal package. 
Apply the annotation on some static constants worth to know that they can be 
changed.
 add 8566937622 Use static constants for most (not all) loggers.
 add 3014fe6003 Opportunistically use the division by `w` in 
ProjectiveTransform for reducing rounding errors with fractional matrix element 
values.
 add bece843ce4 Merge branch 'geoapi-4.0' into geoapi-3.1. Contains cleanup 
on serialization, loggers, rounding errors (again), javadoc.
 new 30388c561a Merge branch 'geoapi-3.1'
 new 668c1d28b5 Disable the use of FMA on the master branch for 
`MathTransform.transform(…)` methods. FMA stay enabled on the geoapi-4.0 
development branch.

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/AboutCommand.java  |   4 +-
 .../java/org/apache/sis/console/package-info.java  |   2 +-
 .../main/java/org/apache/sis/gui/RecentFiles.java  |  14 +-
 .../apache/sis/gui/coverage/CoverageCanvas.java|   7 +-
 .../apache/sis/gui/coverage/GridSliceSelector.java |   8 +-
 .../org/apache/sis/gui/dataset/FeatureLoader.java  |   2 +
 .../org/apache/sis/gui/dataset/FeatureTable.java   |   9 +-
 .../org/apache/sis/gui/dataset/PathAction.java |  12 +-
 .../org/apache/sis/gui/dataset/ResourceCell.java   |   4 +-
 .../org/apache/sis/gui/dataset/ResourceEvent.java  |  33 +-
 .../org/apache/sis/gui/dataset/ResourceTree.java   |   9 +-
 .../org/apache/sis/gui/dataset/WindowHandler.java  |   8 +-
 .../org/apache/sis/gui/dataset/package-info.java   |   2 +-
 .../org/apache/sis/gui/map/GestureFollower.java|   8 +-
 .../java/org/apache/sis/gui/map/MapCanvas.java |   7 +-
 .../java/org/apache/sis/gui/map/MapCanvasAWT.java  |   3 +
 .../org/apache/sis/gui/map/OperationFinder.java|   7 +-
 .../java/org/apache/sis/gui/map/StatusBar.java |   6 +-
 .../org/apache/sis/gui/map/ValuesFormatter.java|   7 +-
 .../org/apache/sis/gui/metadata/MetadataTree.java  |   7 +-
 .../org/apache/sis/gui/metadata/package-info.java  |   2 +-
 .../apache/sis/gui/referencing/AuthorityCodes.java |   7 +-
 .../gui/referencing/PositionableProjection.java|   8 +-
 .../gui/referencing/RecentReferenceSystems.java|   7 +-
 .../java/org/apache/sis/gui/referencing/Utils.java |   7 +-
 .../apache/sis/internal/gui/BackgroundThreads.java |   7 +-
 .../apache/sis/internal/gui/ImageConverter.java|   7 +-
 .../org/apache/sis/internal/gui/LogHandler.java|  10 +-
 .../org/apache/sis/internal/gui/RecentChoices.java |   2 +
 .../java/org/apache/sis/internal/gui/Styles.java   |   7 +-
 .../apache/sis/internal/gui/control/ColorCell.java |   6 +-
 .../org/apache/sis/internal/gui/package-info.java  |   2 +-
 .../org/apache/sis/coverage/SampleRangeFormat.java |   2 +
 .../coverage/grid/CoordinateOperationFinder.java   |   7 +-
 .../apache/sis/coverage/grid/DefaultEvaluator.java |   7 +-
 .../sis/coverage/grid/GridCoverageProcessor.java   |   7 +-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  11 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |   4 +-
 .../apache/sis/feature/AbstractIdentifiedType.java |   9 +-
 .../java/org/apache/sis/feature/FeatureFormat.java |   7 +-
 .../java/org/apache/sis/feature/package-info.java  |   2 +-
 .../apache/sis/image/BandedSampleConverter.java|   7 +-
 .../java/org/apache/sis/image/ErrorAction.java |  13 +-
 .../main/java/org/apache/sis/image/MaskImage.java  |   7 +-
 .../java/org/apache/sis/image/ResampledImage.java  |   7 +-
 .../java/org/apache/sis/image/ResamplingGrid.java  |   2 +
 

[sis] branch geoapi-3.1 updated (f76afb0622 -> bece843ce4)

2023-01-17 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 f76afb0622 Merge branch 'geoapi-4.0' into geoapi-3.1
 add ae61bb0a20 Add missing `equals` and `hashCode` method on a legacy 
metadata property.
 add 8881e88be3 Disable some GIGS tests that are known to fail. 
https://gigs.iogp.org/
 add 0f46e213f3 More advanced test for rounding errors.
 add 8991c55d92 Replace `Path` parameter value by `URI` in operation 
methods using datum shift grids.
 add 8eceb4133a Replace `Path` by `File` in `ResourceEvent` for resolving 
serialization warning. The `File` object was what we needed for storing in 
`RecentFiles` anyway. Opportunistic documentation cleanup.
 add f8afbbfd5b Document `StandardDateFormat` as not intended for 
serialization. We verified that it was not used as non-transient field in a 
serialiable class.
 add c288461503 Consolidate the constants for `ByteBuffer` capacity and 
increase the default capacity from 8 kb to 16 kb.
 add 47e5b43141 Replace some  by  or  headings. This is a 
change in javadoc formatting only.
 add 9f079c7e51 Move the `Configuration` annotation to internal package. 
Apply the annotation on some static constants worth to know that they can be 
changed.
 add 8566937622 Use static constants for most (not all) loggers.
 new 3014fe6003 Opportunistically use the division by `w` in 
ProjectiveTransform for reducing rounding errors with fractional matrix element 
values.
 new bece843ce4 Merge branch 'geoapi-4.0' into geoapi-3.1. Contains cleanup 
on serialization, loggers, rounding errors (again), javadoc.

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/AboutCommand.java  |   4 +-
 .../java/org/apache/sis/console/package-info.java  |   2 +-
 .../main/java/org/apache/sis/gui/RecentFiles.java  |  14 +-
 .../apache/sis/gui/coverage/CoverageCanvas.java|   7 +-
 .../apache/sis/gui/coverage/GridSliceSelector.java |   8 +-
 .../org/apache/sis/gui/dataset/FeatureLoader.java  |   2 +
 .../org/apache/sis/gui/dataset/FeatureTable.java   |   9 +-
 .../org/apache/sis/gui/dataset/PathAction.java |  12 +-
 .../org/apache/sis/gui/dataset/ResourceCell.java   |   4 +-
 .../org/apache/sis/gui/dataset/ResourceEvent.java  |  33 +-
 .../org/apache/sis/gui/dataset/ResourceTree.java   |   9 +-
 .../org/apache/sis/gui/dataset/WindowHandler.java  |   8 +-
 .../org/apache/sis/gui/dataset/package-info.java   |   2 +-
 .../org/apache/sis/gui/map/GestureFollower.java|   8 +-
 .../java/org/apache/sis/gui/map/MapCanvas.java |   7 +-
 .../java/org/apache/sis/gui/map/MapCanvasAWT.java  |   3 +
 .../org/apache/sis/gui/map/OperationFinder.java|   7 +-
 .../java/org/apache/sis/gui/map/StatusBar.java |   6 +-
 .../org/apache/sis/gui/map/ValuesFormatter.java|   7 +-
 .../org/apache/sis/gui/metadata/MetadataTree.java  |   7 +-
 .../org/apache/sis/gui/metadata/package-info.java  |   2 +-
 .../apache/sis/gui/referencing/AuthorityCodes.java |   7 +-
 .../gui/referencing/PositionableProjection.java|   8 +-
 .../gui/referencing/RecentReferenceSystems.java|   7 +-
 .../java/org/apache/sis/gui/referencing/Utils.java |   7 +-
 .../apache/sis/internal/gui/BackgroundThreads.java |   7 +-
 .../apache/sis/internal/gui/ImageConverter.java|   7 +-
 .../org/apache/sis/internal/gui/LogHandler.java|  10 +-
 .../org/apache/sis/internal/gui/RecentChoices.java |   2 +
 .../java/org/apache/sis/internal/gui/Styles.java   |   7 +-
 .../apache/sis/internal/gui/control/ColorCell.java |   6 +-
 .../org/apache/sis/internal/gui/package-info.java  |   2 +-
 .../org/apache/sis/coverage/SampleRangeFormat.java |   2 +
 .../coverage/grid/CoordinateOperationFinder.java   |   7 +-
 .../apache/sis/coverage/grid/DefaultEvaluator.java |   7 +-
 .../sis/coverage/grid/GridCoverageProcessor.java   |   7 +-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  11 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |   4 +-
 .../apache/sis/feature/AbstractIdentifiedType.java |   9 +-
 .../java/org/apache/sis/feature/FeatureFormat.java |   7 +-
 .../java/org/apache/sis/feature/package-info.java  |   2 +-
 .../apache/sis/image/BandedSampleConverter.java|   7 +-
 .../java/org/apache/sis/image/ErrorAction.java |  13 +-
 .../main/java/org/apache/sis/image/MaskImage.java  |   7 +-
 .../java/org/apache/sis/image/ResampledImage.java  |   7 +-
 .../java/org/apache/sis/image/ResamplingGrid.java  |   2 +
 .../java/org/apache/sis/image/package-info.java|   2 +-
 .../sis/internal/coverage/j2d/ImageLayout.java |   4 +
 .../sis/internal/coverage/j2d/ImageUtilities.java  |  15 +-
 

[sis] 01/02: Opportunistically use the division by `w` in ProjectiveTransform for reducing rounding errors with fractional matrix element values.

2023-01-17 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 3014fe6003c66cc4c54a3fc144c3cc339a67e191
Author: Martin Desruisseaux 
AuthorDate: Tue Jan 17 15:19:31 2023 +0100

Opportunistically use the division by `w` in ProjectiveTransform
for reducing rounding errors with fractional matrix element values.
---
 .../transform/AbstractLinearTransform.java |   4 +-
 .../operation/transform/ProjectiveTransform.java   | 221 -
 .../transform/ProjectiveTransformTest.java |  12 ++
 3 files changed, 182 insertions(+), 55 deletions(-)

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 f37950fc84..f8cc1d777e 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
@@ -80,8 +80,8 @@ abstract class AbstractLinearTransform extends 
AbstractMathTransform implements
 for (int i=0; iDenominator column
+ * An additional column is appended after the translation column.
+ * That column contains a denominator inferred from fractional values 
found on the row.
+ * All elements in the matrix row shall be multiplied by that denominator.
+ * The intend is to increase the chances that matrix elements are integer 
values.
+ * If no fractional value is found, the default denominator value is 1.
  */
 private final double[] elt;
 
 /**
- * Same numbers than {@link #elt} with potentially extended precision.
+ * Same numbers than {@link #elt} excluding the denominators and with 
potentially extended precision.
  * Zero values shall be represented by null elements.
  */
 private final Number[] numbers;
@@ -74,47 +90,110 @@ class ProjectiveTransform extends AbstractLinearTransform 
implements ExtendedPre
 /**
  * Constructs a transform from the specified matrix.
  * The matrix is usually square and affine, but this is not enforced.
+ * Non-affine transforms (e.g. projective transforms) are accepted but may 
not be invertible.
  *
- * @param matrix  the matrix.
+ * @param matrix  the matrix containing the coefficients of this 
projective transform.
  */
 protected ProjectiveTransform(final Matrix matrix) {
 numRow = matrix.getNumRow();
 numCol = matrix.getNumCol();
-Number[] numbers = null;
+/*
+ * Get the matrix elements as `Number` instances if possible.
+ * Those instances allow better precision than `double` values.
+ * Those numbers are available only through SIS-specific API.
+ */
+final boolean hasNumbers;
 if (matrix instanceof ExtendedPrecisionMatrix) {
 // Use `writable = true` because we need a copy protected from 
changes.
 numbers = ((ExtendedPrecisionMatrix) 
matrix).getElementAsNumbers(true);
-}
-if (matrix instanceof MatrixSIS) {
+hasNumbers = true;
+} else if (matrix instanceof MatrixSIS) {
 final MatrixSIS m = (MatrixSIS) matrix;
-elt = m.getElements();
-if (elt.length != numRow * numCol) {
-throw new 
IllegalArgumentException(Errors.format(Errors.Keys.MismatchedArrayLengths));
-}
-if (numbers == null) {
-numbers = new Number[elt.length];
-for (int i=0; iNote: this method should always returns {@code 
false}, since
+ * Note
+ * This method should always returns {@code false}, because
  * {@code MathTransforms.linear(…)} should have created specialized 
implementations for identity cases.
  * Nevertheless we perform the full check as a safety, in case someone 
instantiated this class directly
- * instead of using a factory method.
+ * instead of using a factory method.
  */
 @Override
 public final boolean isIdentity() {
 if (numRow != numCol) {
 return false;
 }
-int mix = 0;
-for (int j=0; j

[sis] 02/02: Merge branch 'geoapi-4.0' into geoapi-3.1. Contains cleanup on serialization, loggers, rounding errors (again), javadoc.

2023-01-17 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 bece843ce420f0355a4b0dc1f1effc2337594ff3
Merge: f76afb0622 3014fe6003
Author: Martin Desruisseaux 
AuthorDate: Tue Jan 17 15:27:57 2023 +0100

Merge branch 'geoapi-4.0' into geoapi-3.1.
Contains cleanup on serialization, loggers, rounding errors (again), 
javadoc.

 .../java/org/apache/sis/console/AboutCommand.java  |   4 +-
 .../java/org/apache/sis/console/package-info.java  |   2 +-
 .../main/java/org/apache/sis/gui/RecentFiles.java  |  14 +-
 .../apache/sis/gui/coverage/CoverageCanvas.java|   7 +-
 .../apache/sis/gui/coverage/GridSliceSelector.java |   8 +-
 .../org/apache/sis/gui/dataset/FeatureLoader.java  |   2 +
 .../org/apache/sis/gui/dataset/FeatureTable.java   |   9 +-
 .../org/apache/sis/gui/dataset/PathAction.java |  12 +-
 .../org/apache/sis/gui/dataset/ResourceCell.java   |   4 +-
 .../org/apache/sis/gui/dataset/ResourceEvent.java  |  33 +-
 .../org/apache/sis/gui/dataset/ResourceTree.java   |   9 +-
 .../org/apache/sis/gui/dataset/WindowHandler.java  |   8 +-
 .../org/apache/sis/gui/dataset/package-info.java   |   2 +-
 .../org/apache/sis/gui/map/GestureFollower.java|   8 +-
 .../java/org/apache/sis/gui/map/MapCanvas.java |   7 +-
 .../java/org/apache/sis/gui/map/MapCanvasAWT.java  |   3 +
 .../org/apache/sis/gui/map/OperationFinder.java|   7 +-
 .../java/org/apache/sis/gui/map/StatusBar.java |   6 +-
 .../org/apache/sis/gui/map/ValuesFormatter.java|   7 +-
 .../org/apache/sis/gui/metadata/MetadataTree.java  |   7 +-
 .../org/apache/sis/gui/metadata/package-info.java  |   2 +-
 .../apache/sis/gui/referencing/AuthorityCodes.java |   7 +-
 .../gui/referencing/PositionableProjection.java|   8 +-
 .../gui/referencing/RecentReferenceSystems.java|   7 +-
 .../java/org/apache/sis/gui/referencing/Utils.java |   7 +-
 .../apache/sis/internal/gui/BackgroundThreads.java |   7 +-
 .../apache/sis/internal/gui/ImageConverter.java|   7 +-
 .../org/apache/sis/internal/gui/LogHandler.java|  10 +-
 .../org/apache/sis/internal/gui/RecentChoices.java |   2 +
 .../java/org/apache/sis/internal/gui/Styles.java   |   7 +-
 .../apache/sis/internal/gui/control/ColorCell.java |   6 +-
 .../org/apache/sis/internal/gui/package-info.java  |   2 +-
 .../org/apache/sis/coverage/SampleRangeFormat.java |   2 +
 .../coverage/grid/CoordinateOperationFinder.java   |   7 +-
 .../apache/sis/coverage/grid/DefaultEvaluator.java |   7 +-
 .../sis/coverage/grid/GridCoverageProcessor.java   |   7 +-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  11 +-
 .../org/apache/sis/coverage/grid/GridGeometry.java |   4 +-
 .../apache/sis/feature/AbstractIdentifiedType.java |   9 +-
 .../java/org/apache/sis/feature/FeatureFormat.java |   7 +-
 .../java/org/apache/sis/feature/package-info.java  |   2 +-
 .../apache/sis/image/BandedSampleConverter.java|   7 +-
 .../java/org/apache/sis/image/ErrorAction.java |  13 +-
 .../main/java/org/apache/sis/image/MaskImage.java  |   7 +-
 .../java/org/apache/sis/image/ResampledImage.java  |   7 +-
 .../java/org/apache/sis/image/ResamplingGrid.java  |   2 +
 .../java/org/apache/sis/image/package-info.java|   2 +-
 .../sis/internal/coverage/j2d/ImageLayout.java |   4 +
 .../sis/internal/coverage/j2d/ImageUtilities.java  |  15 +-
 .../apache/sis/internal/feature/Geometries.java|   9 +-
 .../sis/internal/feature/GeometryFactories.java|   6 +-
 .../org/apache/sis/internal/feature/jts/JTS.java   |   7 +-
 .../sis/internal/feature/jts/package-info.java |   2 +-
 .../apache/sis/internal/feature/package-info.java  |   2 +-
 .../java/org/apache/sis/internal/filter/Node.java  |  12 +-
 .../internal/filter/sqlmm/RegistryTestCase.java|   8 +-
 .../apache/sis/internal/metadata/Dependencies.java |   3 +-
 .../sis/internal/metadata/ServicesForUtility.java  |   8 +-
 .../internal/metadata/legacy/DateToTemporal.java   |  25 +-
 .../internal/metadata/legacy/TemporalToDate.java   |  25 +-
 .../sis/internal/metadata/legacy/package-info.java |   2 +-
 .../sis/internal/metadata/sql/Initializer.java |  32 +-
 .../sis/internal/metadata/sql/LocalDataSource.java |  14 +-
 .../sis/internal/metadata/sql/package-info.java|   2 +-
 .../sis/internal/simple/CitationConstant.java  |  12 +-
 .../apache/sis/internal/simple/package-info.java   |   2 +-
 .../org/apache/sis/metadata/AbstractMetadata.java  |   4 +-
 .../org/apache/sis/metadata/MetadataStandard.java  |   2 +
 .../apache/sis/metadata/PropertyInformation.java   |  11 +-
 .../sis/metadata/StandardImplementation.java   |  15 +-
 .../org/apache/sis/metadata/TreeNodeChildren.java  |   4 +-
 .../java/org/apache/sis/metadata/package-info.java |   2 +-
 .../apache/sis/metadata/sql/MetadataSource.java|  10 +-
 .../org/apache/sis/metadata/sql/package-info.java  |   2 +-