This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch geoapi-4.0 in repository https://gitbox.apache.org/repos/asf/sis.git
commit c2ecd1f664a5419bf4e4b0d531f450130e0465ee Author: Martin Desruisseaux <[email protected]> AuthorDate: Thu Aug 6 00:13:34 2026 +0200 Fix a mismatched dimension exception when showing coverage values below the cursor. --- .../main/org/apache/sis/gui/map/ValuesFormatter.java | 7 ++++++- .../main/org/apache/sis/gui/map/ValuesUnderCursor.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/ValuesFormatter.java b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/ValuesFormatter.java index fbab35500b..4716a3e63d 100644 --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/ValuesFormatter.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/ValuesFormatter.java @@ -116,7 +116,7 @@ final class ValuesFormatter extends ValuesUnderCursor.Formatter { * @see #toNodataKey(int, float) * @see MathFunctions#toNanOrdinal(float) */ - private final Map<Long,String> nodata; + private final Map<Long, String> nodata; /** * The text to show when cursor is outside coverage area. It should contain dimension names, for example "(SST)". @@ -383,6 +383,11 @@ final class ValuesFormatter extends ValuesUnderCursor.Formatter { @Override public double getCoordinate(final int dimension) { return coordinates[dimension]; } + + /** Returns the coordinate reference system of this position. */ + @Override public CoordinateReferenceSystem getCoordinateReferenceSystem() { + return crs; + } } /** diff --git a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/ValuesUnderCursor.java b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/ValuesUnderCursor.java index c8e7493788..9c9fe689f7 100644 --- a/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/ValuesUnderCursor.java +++ b/optional/src/org.apache.sis.gui/main/org/apache/sis/gui/map/ValuesUnderCursor.java @@ -160,7 +160,7 @@ public abstract class ValuesUnderCursor { */ protected abstract static class Formatter implements Runnable { /** - * Coordinates and <abbr>CRS</abbr> of the position where to evaluate values. + * Coordinates and <abbr>CRS</abbr> of the position where to evaluate sample values. * This position shall not be modified; new coordinates shall be specified in a new instance. * A {@code null} value means that there is no more sample values to format. *
