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/11/08 16:30:59 UTC
[sis] 01/03: Minor javadoc additions.
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 ca709c60cb20030c36242e278f6a2663db7c953d
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Mon Nov 8 10:17:52 2021 +0100
Minor javadoc additions.
---
.../src/main/java/org/apache/sis/image/ImageAdapter.java | 4 ++++
.../src/main/java/org/apache/sis/image/SourceAlignedImage.java | 9 +++++++++
.../src/test/java/org/apache/sis/test/FeatureAssert.java | 4 +++-
.../main/java/org/apache/sis/internal/earth/netcdf/GCOM_C.java | 2 +-
4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/ImageAdapter.java b/core/sis-feature/src/main/java/org/apache/sis/image/ImageAdapter.java
index b119af5..c75124d 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/ImageAdapter.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/ImageAdapter.java
@@ -36,6 +36,10 @@ import org.apache.sis.util.ArgumentChecks;
* most non-abstract methods are final because {@link PixelIterator} (among others) relies
* on the fact that it can unwrap this image and still get the same pixel values.</div>
*
+ * <div class="note"><b>Relationship with other classes</b><br>
+ * This class is similar to {@link SourceAlignedImage} except that it does not extend {@link ComputedImage}
+ * and forward {@link #getTile(int, int)}, {@link #getData()} and other data methods to the source image.</div>
+ *
* @author Martin Desruisseaux (Geomatys)
* @version 1.1
* @since 1.1
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/SourceAlignedImage.java b/core/sis-feature/src/main/java/org/apache/sis/image/SourceAlignedImage.java
index dd26791..65e0b03 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/SourceAlignedImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/SourceAlignedImage.java
@@ -29,12 +29,19 @@ import org.apache.sis.internal.jdk9.JDK9;
* An image computed from a single source and sharing the same coordinate system.
* In addition of pixel coordinate system, images share also the same tile indices.
* Tiles in this image have the same size than tiles in the source image.
+ * See {@link ComputedImage} javadoc for more information about tile computation.
*
* <div class="note"><b>Relationship with other classes</b><br>
* This class is similar to {@link ImageAdapter} except that it extends {@link ComputedImage}
* and does not forward {@link #getTile(int, int)}, {@link #getData()} and other data methods
* to the source image.</div>
*
+ * <h2>Sub-classing</h2>
+ * Subclasses need to implement at least the {@link #computeTile(int, int, WritableRaster)} method.
+ * That method is invoked when a requested tile is not in the cache or needs to be updated.
+ * All methods related to pixel and tile coordinates ({@link #getMinX()}, {@link #getMinTileX()},
+ * <i>etc.</i>) are final and delegate to the source image.
+ *
* @author Martin Desruisseaux (Geomatys)
* @version 1.2
* @since 1.1
@@ -67,6 +74,8 @@ abstract class SourceAlignedImage extends ComputedImage {
/**
* Creates a new image with the given source, color model and sample model.
+ * This constructor is not public because user could specify a sample model
+ * with mismatched tile size.
*
* @param source source of this image. Shall not be null.
* @param colorModel the color model of the new image.
diff --git a/core/sis-feature/src/test/java/org/apache/sis/test/FeatureAssert.java b/core/sis-feature/src/test/java/org/apache/sis/test/FeatureAssert.java
index 985799e..0444535 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/test/FeatureAssert.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/test/FeatureAssert.java
@@ -44,7 +44,9 @@ public strictfp class FeatureAssert extends ReferencingAssert {
}
/**
- * Verifies that sample values in the given image are equal to the expected integer values.
+ * Verifies that sample values in the given image are equal to the expected values.
+ * Sample values are compared using floating point {@code double} precision.
+ * NaN values must be strictly equals (same bit pattern).
*
* @param expected the expected sample values.
* @param boundsExpected bounds of the expected region, or {@code null} for the whole image.
diff --git a/profiles/sis-japan-profile/src/main/java/org/apache/sis/internal/earth/netcdf/GCOM_C.java b/profiles/sis-japan-profile/src/main/java/org/apache/sis/internal/earth/netcdf/GCOM_C.java
index af3265b..ad4aebb 100644
--- a/profiles/sis-japan-profile/src/main/java/org/apache/sis/internal/earth/netcdf/GCOM_C.java
+++ b/profiles/sis-japan-profile/src/main/java/org/apache/sis/internal/earth/netcdf/GCOM_C.java
@@ -69,7 +69,7 @@ import ucar.nc2.constants.CF;
* variables:
* ushort SST(1599, 1250) // Note: different size than (latitude, longitude) variables.
* string dim0 = "Line grids"
- * string dim1 = "Piexl grids" // Note: typo in "Pixel"
+ * string dim1 = "Piexl grids" // Note: typo in "Pixel"
* ushort Error_DN = 65535
* ushort Land_DN = 65534
* ushort Cloud_error_DN = 65533