You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2021/12/08 14:52:41 UTC
[sis] branch geoapi-4.0 updated (658a46a -> 5c39a43)
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 658a46a Partial workaround of unnamed netCDF dimensions considered equal. This workaround does not completely solve the problem because a fix relative to `ucar.nc2.dataset.CoordinateSystem` is also needed.
new ddc02b2 Reverse the order of elements in `GridCoverageResource.getResolutions()`: from finest (smallest numbers) to coarsest (larger numbers).
new 3c059ab Javadoc clarifications.
new 39c8542 Change Interpolation interface to an abstract class. Needed for addition of package-private method in next commit.
new 5c39a43 Fix a problem of incompatible (SampleModel, ColorModel) pair when `Visualization` determined that it can not apply interpolations.
The 4 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/image/Interpolation.java | 50 ++++++++++++++++++----
.../org/apache/sis/image/LanczosInterpolation.java | 4 +-
.../java/org/apache/sis/image/ResampledImage.java | 12 +-----
.../java/org/apache/sis/image/Visualization.java | 22 +++-------
.../internal/coverage/j2d/BatchComputedImage.java | 10 ++++-
.../coverage/MultiResolutionCoverageLoader.java | 8 ++--
.../MultiResolutionCoverageLoaderTest.java | 6 +--
.../sis/storage/geotiff/MultiResolutionImage.java | 3 +-
.../sis/internal/storage/GridResourceWrapper.java | 1 +
.../apache/sis/storage/GridCoverageResource.java | 2 +-
10 files changed, 69 insertions(+), 49 deletions(-)
[sis] 01/04: Reverse the order of elements in `GridCoverageResource.getResolutions()`: from finest (smallest numbers) to coarsest (larger numbers).
Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
commit ddc02b267de5851a7e73368da8c589ec4d570d55
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Wed Dec 8 10:57:25 2021 +0100
Reverse the order of elements in `GridCoverageResource.getResolutions()`:
from finest (smallest numbers) to coarsest (larger numbers).
---
.../sis/internal/map/coverage/MultiResolutionCoverageLoader.java | 8 +++-----
.../internal/map/coverage/MultiResolutionCoverageLoaderTest.java | 6 +++---
.../java/org/apache/sis/storage/geotiff/MultiResolutionImage.java | 3 +--
.../java/org/apache/sis/internal/storage/GridResourceWrapper.java | 1 +
.../main/java/org/apache/sis/storage/GridCoverageResource.java | 2 +-
5 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/coverage/MultiResolutionCoverageLoader.java b/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/coverage/MultiResolutionCoverageLoader.java
index 93e0238..53610b5 100644
--- a/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/coverage/MultiResolutionCoverageLoader.java
+++ b/core/sis-portrayal/src/main/java/org/apache/sis/internal/map/coverage/MultiResolutionCoverageLoader.java
@@ -38,7 +38,6 @@ import org.apache.sis.coverage.grid.GridRoundingMode;
import org.apache.sis.internal.util.CollectionsExt;
import org.apache.sis.math.DecimalFunctions;
import org.apache.sis.io.TableAppender;
-import org.apache.sis.util.ArraysExt;
/**
@@ -88,8 +87,8 @@ public class MultiResolutionCoverageLoader {
/**
* Squares of resolution at each pyramid level, from finest (smaller numbers) to coarsest (largest numbers).
- * Note that this is the reverse order of {@link GridCoverageResource#getResolutions()}. For a given level,
- * the array {@code resolutionSquared[level]} gives the squares of the resolution for each CRS dimension.
+ * This is same same order than {@link GridCoverageResource#getResolutions()}. For a given level, the array
+ * {@code resolutionSquared[level]} gives the squares of the resolution for each CRS dimension.
*/
private final double[][] resolutionSquared;
@@ -128,7 +127,6 @@ public class MultiResolutionCoverageLoader {
areaOfInterest = domain;
readRanges = range;
double[][] resolutions = CollectionsExt.toArray(resource.getResolutions(), double[].class);
- ArraysExt.reverse(resolutions); // From finest to coarsest resolution.
if (resolutions.length <= 1) {
final GridGeometry gg = resource.getGridGeometry();
if (resolutions.length != 0) {
@@ -248,7 +246,7 @@ dimensions: for (int j=0; j<tgtDim; j++) {
}
/*
* Can not use `Arrays.binarySearch(…)` because elements are not guaranteed to be sorted.
- * Even if `GridCoverageResource.getResolutions()` contract said "coarsest to finest",
+ * Even if `GridCoverageResource.getResolutions()` contract said "finest to coarsest",
* it may not be possible to respect this condition on all dimensions in same time.
* The main goal is to have a `level` value as high as possible while having a resolution
* equals or better than `sum`.
diff --git a/core/sis-portrayal/src/test/java/org/apache/sis/internal/map/coverage/MultiResolutionCoverageLoaderTest.java b/core/sis-portrayal/src/test/java/org/apache/sis/internal/map/coverage/MultiResolutionCoverageLoaderTest.java
index 1be2007..77bb343 100644
--- a/core/sis-portrayal/src/test/java/org/apache/sis/internal/map/coverage/MultiResolutionCoverageLoaderTest.java
+++ b/core/sis-portrayal/src/test/java/org/apache/sis/internal/map/coverage/MultiResolutionCoverageLoaderTest.java
@@ -100,7 +100,7 @@ public final strictfp class MultiResolutionCoverageLoaderTest extends TestCase {
/**
* A dummy resource with arbitrary resolutions for testing purpose.
- * Resolutions are ordered from coarsest (largest numbers) to finest (smallest numbers).
+ * Resolutions are ordered from finest (smallest numbers) to coarsest (largest numbers).
*/
private static final class DummyResource extends AbstractGridResource {
/** Creates a dummy resource. */
@@ -111,9 +111,9 @@ public final strictfp class MultiResolutionCoverageLoaderTest extends TestCase {
/** Returns the preferred resolutions in units of CRS axes. */
@Override public List<double[]> getResolutions() {
return Arrays.asList(
- new double[] {8, 9, 5},
+ new double[] {2, 3, 1},
new double[] {4, 4, 3},
- new double[] {2, 3, 1});
+ new double[] {8, 9, 5});
}
/** Returns a grid geometry with the resolution of finest level. */
diff --git a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/MultiResolutionImage.java b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/MultiResolutionImage.java
index 5c1b205..84e550e 100644
--- a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/MultiResolutionImage.java
+++ b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/MultiResolutionImage.java
@@ -21,7 +21,6 @@ import java.util.Arrays;
import java.io.IOException;
import org.opengis.referencing.datum.PixelInCell;
import org.opengis.referencing.operation.TransformException;
-import org.apache.sis.util.ArraysExt;
import org.apache.sis.coverage.grid.GridExtent;
import org.apache.sis.coverage.grid.GridGeometry;
import org.apache.sis.coverage.grid.GridCoverage;
@@ -142,6 +141,7 @@ final class MultiResolutionImage extends GridResourceWrapper {
/**
* Returns the preferred resolutions (in units of CRS axes) for read operations in this data store.
+ * Elements are ordered from finest (smallest numbers) to coarsest (largest numbers) resolution.
*/
@Override
public List<double[]> getResolutions() throws DataStoreException {
@@ -151,7 +151,6 @@ final class MultiResolutionImage extends GridResourceWrapper {
copy[i] = resolution(i).clone();
}
}
- ArraysExt.reverse(copy);
return Arrays.asList(copy);
}
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GridResourceWrapper.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GridResourceWrapper.java
index 3794c4f..e922a12 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GridResourceWrapper.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GridResourceWrapper.java
@@ -150,6 +150,7 @@ public abstract class GridResourceWrapper implements GridCoverageResource {
/**
* Returns the preferred resolutions (in units of CRS axes) for read operations in this data store.
+ * Elements are ordered from finest (smallest numbers) to coarsest (largest numbers) resolution.
*
* @return preferred resolutions for read operations in this data store, or an empty array if none.
* @throws DataStoreException if an error occurred while reading definitions from the underlying data store.
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/storage/GridCoverageResource.java b/storage/sis-storage/src/main/java/org/apache/sis/storage/GridCoverageResource.java
index e2eceb5..9b96bb9 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/storage/GridCoverageResource.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/storage/GridCoverageResource.java
@@ -111,7 +111,7 @@ public interface GridCoverageResource extends DataSet {
/**
* Returns the preferred resolutions (in units of CRS axes) for read operations in this data store.
* If the storage supports pyramid, then the list should contain the resolution at each pyramid level
- * ordered from coarsest (largest numbers) to finest (smallest numbers) resolution.
+ * ordered from finest (smallest numbers) to coarsest (largest numbers) resolution.
* Otherwise the list contains a single element which is the {@linkplain #getGridGeometry() grid geometry}
* resolution, or an empty list if no resolution is applicable to the coverage (e.g. because non-constant).
*
[sis] 02/04: Javadoc clarifications.
Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
commit 3c059ab2fc5c73187a7bad16e568f4e017bc875e
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Wed Dec 8 11:28:58 2021 +0100
Javadoc clarifications.
---
.../apache/sis/internal/coverage/j2d/BatchComputedImage.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/BatchComputedImage.java b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/BatchComputedImage.java
index 2d596a8..77e816b 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/BatchComputedImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/BatchComputedImage.java
@@ -128,9 +128,16 @@ public abstract class BatchComputedImage extends ComputedImage {
/**
* Computes immediately and returns all tiles in the given ranges of tile indices.
+ * Tiles shall be returned in row-major order.
* It is implementer responsibility to ensure that all rasters have consistent
* {@link Raster#getMinX()}/{@code getMinY()} values.
*
+ * @todo The return type should be changed to something more reactive, maybe {@link java.util.concurrent.Flow}.
+ * It would allow processing (e.g. map reprojection) of some tiles as soon as they become available,
+ * without waiting for all tiles to be available. Note that the tiles can be returned in any order.
+ * For example the TIFF reader is reading tiles in arbitrary order, then rearranges them in the array.
+ * So the "row-major" order in above javadoc could not apply anymore.
+ *
* @param tiles range of tile indices for which to precompute tiles.
* @return precomputed tiles for the given indices, in row-major fashion.
* @throws Exception if an error occurred when computing tiles.
@@ -139,7 +146,8 @@ public abstract class BatchComputedImage extends ComputedImage {
/**
* Invoked when a single tile need to be computed.
- * The default implementation delegates to {@link #computeTiles(Rectangle)}.
+ * This method first searches for the tile in the regions prepared by calls to {@link #prefetch(Rectangle)}.
+ * If the requested tile is not already fetched, then this method delegates to {@link #computeTiles(Rectangle)}.
*
* @param tileX the column index of the tile to compute.
* @param tileY the row index of the tile to compute.
[sis] 04/04: Fix a problem of incompatible (SampleModel, ColorModel) pair when `Visualization` determined that it can not apply interpolations.
Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
commit 5c39a4340e635a95fecb86fc271027ade5303223
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Wed Dec 8 15:29:16 2021 +0100
Fix a problem of incompatible (SampleModel, ColorModel) pair when `Visualization` determined that it can not apply interpolations.
---
.../java/org/apache/sis/image/Interpolation.java | 26 ++++++++++++++++++++++
.../java/org/apache/sis/image/ResampledImage.java | 12 +---------
.../java/org/apache/sis/image/Visualization.java | 20 +++++------------
3 files changed, 33 insertions(+), 25 deletions(-)
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/Interpolation.java b/core/sis-feature/src/main/java/org/apache/sis/image/Interpolation.java
index 9943dc0..63ef0bd 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/Interpolation.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/Interpolation.java
@@ -17,6 +17,8 @@
package org.apache.sis.image;
import java.awt.Dimension;
+import java.awt.image.RenderedImage;
+import java.awt.image.IndexColorModel;
import java.nio.DoubleBuffer;
@@ -106,6 +108,25 @@ public abstract class Interpolation {
public abstract void interpolate(DoubleBuffer source, int numBands, double xfrac, double yfrac, double[] writeTo, int writeToOffset);
/**
+ * Returns {@link #NEAREST} if interpolations on the given image should be restricted to nearest-neighbor.
+ * If the given image uses an index color model, interpolating the indexed values does not produce the
+ * expected colors. Safest approach is to disable completely interpolations in that case.
+ *
+ * <div class="note"><b>Note:</b>
+ * we could interpolate if we knew that all index values, without exception (i.e. no index for missing values),
+ * are related to measurements by a linear function. In practice it rarely happens, because there is usually
+ * at least one index value reserved for missing values. Scientific data in SIS are usually stored as floating
+ * point type (with missing values mapped to NaN), which can not be associated to {@link IndexColorModel}.
+ * For now we do not try to perform a more sophisticated detection of which interpolations are allowed,
+ * but a future SIS version may revisit this policy if needed.</div>
+ *
+ * @return {@link #NEAREST} if interpolations should be restricted to nearest-neighbor, or {@code this} otherwise.
+ */
+ Interpolation toCompatible(final RenderedImage source) {
+ return (source.getColorModel() instanceof IndexColorModel) ? NEAREST : this;
+ }
+
+ /**
* A nearest-neighbor interpolation using 1×1 pixel.
*/
public static final Interpolation NEAREST = new Interpolation() {
@@ -128,6 +149,11 @@ public abstract class Interpolation {
source.get(writeTo, writeToOffset, numBands);
source.reset();
}
+
+ /** This interpolation never need to be disabled. */
+ @Override Interpolation toCompatible(final RenderedImage source) {
+ return this;
+ }
};
/**
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/ResampledImage.java b/core/sis-feature/src/main/java/org/apache/sis/image/ResampledImage.java
index 9f8ded6..ec3107e 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/ResampledImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/ResampledImage.java
@@ -24,7 +24,6 @@ import java.awt.Dimension;
import java.awt.Rectangle;
import java.awt.geom.Rectangle2D;
import java.awt.image.ColorModel;
-import java.awt.image.IndexColorModel;
import java.awt.image.Raster;
import java.awt.image.RenderedImage;
import java.awt.image.WritableRaster;
@@ -245,17 +244,8 @@ public class ResampledImage extends ComputedImage {
/*
* If the image uses an index color model, interpolating the indexed values does not produce
* the expected colors. Safest approach is to disable completely interpolations in that case.
- *
- * Note: we could interpolate if we knew that all index values, without exception (i.e. no index for
- * missing values), are related to measurements by a linear function. It practice it rarely happens,
- * because there is usually at least one index value reserved for missing values. Scientific data in
- * SIS are usually stored as floating point type (with missing values mapped to NaN), which can not
- * be associated to `IndexColorModel`. For now we don't try to perform a more sophisticated detection
- * of which interpolations are allowed, but a future SIS version may revisit this policy if needed.
*/
- if (source.getColorModel() instanceof IndexColorModel) {
- interpolation = Interpolation.NEAREST;
- }
+ interpolation = interpolation.toCompatible(source);
/*
* If the interpolation requires more than 2×2 pixels, we will need to shift the transform
* to source image. For example if the interpolation requires 4×4 pixels, the interpolation
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java b/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java
index 110aed7..393f65f 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java
@@ -30,7 +30,6 @@ import java.awt.image.SampleModel;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
import java.awt.image.RenderedImage;
-import java.awt.image.DataBuffer;
import java.nio.DoubleBuffer;
import javax.measure.Quantity;
import org.apache.sis.coverage.Category;
@@ -250,18 +249,6 @@ final class Visualization extends ResampledImage {
colorizer.initialize(statistics.minimum(), statistics.maximum());
}
/*
- * At this point we finished to configure the colorizer; we are ready to build the `ColorModel`.
- * If the source image uses unsigned integer types and there is no resampling operation, we can
- * update the color model without changing sample values. This is much cheaper and as accurate.
- */
- final int dataType = source.getSampleModel().getDataType();
- if (dataType == DataBuffer.TYPE_BYTE || dataType == DataBuffer.TYPE_USHORT) {
- if (toSource != null && !toSource.isIdentity()) {
- source = processor.resample(source, bounds, toSource);
- }
- return RecoloredImage.create(source, colorizer.createColorModel(dataType, NUM_BANDS, VISIBLE_BAND));
- }
- /*
* If we reach this point, sample values need to be converted to integers in [0 … 255] range.
* Skip any previous `RecoloredImage` since we are replacing the `ColorModel` by a new one.
*/
@@ -284,7 +271,7 @@ final class Visualization extends ResampledImage {
layout = ImageLayout.fixedSize(source);
interpolation = Interpolation.NEAREST;
} else {
- interpolation = combine(interpolation, converters);
+ interpolation = combine(interpolation.toCompatible(source), converters);
converters = null;
}
/*
@@ -365,6 +352,11 @@ final class Visualization extends ResampledImage {
throw new BackingStoreException(e); // Will be unwrapped by computeTile(…).
}
}
+
+ /** This interpolation never need to be disabled. */
+ @Override Interpolation toCompatible(final RenderedImage source) {
+ return this;
+ }
}
/**
[sis] 03/04: Change Interpolation interface to an abstract class. Needed for addition of package-private method in next commit.
Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
commit 39c8542e4147760f07ffde30f135288e4dcc4c8a
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Wed Dec 8 15:05:46 2021 +0100
Change Interpolation interface to an abstract class.
Needed for addition of package-private method in next commit.
https://issues.apache.org/jira/browse/SIS-530
---
.../java/org/apache/sis/image/Interpolation.java | 24 ++++++++++++++--------
.../org/apache/sis/image/LanczosInterpolation.java | 4 ++--
.../java/org/apache/sis/image/Visualization.java | 2 +-
3 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/Interpolation.java b/core/sis-feature/src/main/java/org/apache/sis/image/Interpolation.java
index b610539..9943dc0 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/Interpolation.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/Interpolation.java
@@ -25,19 +25,25 @@ import java.nio.DoubleBuffer;
* of pixels using a local neighborhood. The sampling is performed by the {@link ResampledImage} class, which
* gives the sample values to the {@code interpolate(…)} method of this interpolation.
*
- * <p>All methods in this interface shall be safe for concurrent use in multi-threading context.
+ * <p>All methods in this class shall be safe for concurrent use in multi-threading context.
* For example interpolations may be executed in a different thread for each tile in an image.</p>
*
- * <p>This interface is designed for interpolations in a two-dimensional space only.</p>
+ * <p>This class is designed for interpolations in a two-dimensional space only.</p>
*
* @author Rémi Marechal (Geomatys)
* @author Martin Desruisseaux (Geomatys)
* @author Johann Sorel (Geomatys)
- * @version 1.1
+ * @version 1.2
* @since 1.1
* @module
*/
-public interface Interpolation {
+public abstract class Interpolation {
+ /**
+ * Creates a new interpolation.
+ */
+ protected Interpolation() {
+ }
+
/**
* Returns the size of the area over which the resampling function needs to provide values.
* Common values are:
@@ -53,7 +59,7 @@ public interface Interpolation {
*
* @return number of sample values required for interpolations.
*/
- Dimension getSupportSize();
+ public abstract Dimension getSupportSize();
/**
* Interpolates sample values for all bands using the given pixel values in local neighborhood.
@@ -97,12 +103,12 @@ public interface Interpolation {
* @param writeTo the array where this method shall write interpolated values.
* @param writeToOffset index of the first value to put in the {@code writeTo} array.
*/
- void interpolate(DoubleBuffer source, int numBands, double xfrac, double yfrac, double[] writeTo, int writeToOffset);
+ public abstract void interpolate(DoubleBuffer source, int numBands, double xfrac, double yfrac, double[] writeTo, int writeToOffset);
/**
* A nearest-neighbor interpolation using 1×1 pixel.
*/
- Interpolation NEAREST = new Interpolation() {
+ public static final Interpolation NEAREST = new Interpolation() {
/** Interpolation name for debugging purpose. */
@Override public String toString() {
return "NEAREST";
@@ -128,7 +134,7 @@ public interface Interpolation {
* A bilinear interpolation using 2×2 pixels.
* If the interpolation result is NaN, this method fallbacks on nearest-neighbor.
*/
- Interpolation BILINEAR = new Interpolation() {
+ public static final Interpolation BILINEAR = new Interpolation() {
/** Interpolation name for debugging purpose. */
@Override public String toString() {
return "BILINEAR";
@@ -167,5 +173,5 @@ public interface Interpolation {
*
* @see <a href="https://en.wikipedia.org/wiki/Lanczos_resampling">Lanczos resampling on Wikipedia</a>
*/
- Interpolation LANCZOS = new LanczosInterpolation(3);
+ public static final Interpolation LANCZOS = new LanczosInterpolation(3);
}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/LanczosInterpolation.java b/core/sis-feature/src/main/java/org/apache/sis/image/LanczosInterpolation.java
index 8c238a8..fa3d0ae 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/LanczosInterpolation.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/LanczosInterpolation.java
@@ -31,14 +31,14 @@ import java.nio.DoubleBuffer;
*
* @author Rémi Marechal (Geomatys)
* @author Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.2
*
* @see <a href="https://en.wikipedia.org/wiki/Lanczos_resampling">Lanczos resampling on Wikipedia</a>
*
* @since 1.1
* @module
*/
-final class LanczosInterpolation implements Interpolation {
+final class LanczosInterpolation extends Interpolation {
/**
* The Lanczos window size. This is denoted <var>a</var> in this class javadoc.
*/
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java b/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java
index 4e593eb..110aed7 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java
@@ -317,7 +317,7 @@ final class Visualization extends ResampledImage {
* destination image. This class is used for combining {@link ResampledImage} and {@link BandedSampleConverter}
* in a single operation.
*/
- static class InterpConvert implements Interpolation {
+ static class InterpConvert extends Interpolation {
/**
* The object to use for performing interpolations.
*