This is an automated email from the ASF dual-hosted git repository. jsorel 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 1c959654f2 Cache loaded tiles in GIMI resource 1c959654f2 is described below commit 1c959654f244c649e21d7ba718c2cfd903283179 Author: jsorel <johann.so...@geomatys.com> AuthorDate: Wed Oct 16 11:47:19 2024 +0200 Cache loaded tiles in GIMI resource --- .../main/org/apache/sis/storage/gimi/ResourceImageUncompressed.java | 2 +- .../main/org/apache/sis/storage/gimi/internal/MatrixGridRessource.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/incubator/src/org.apache.sis.storage.gimi/main/org/apache/sis/storage/gimi/ResourceImageUncompressed.java b/incubator/src/org.apache.sis.storage.gimi/main/org/apache/sis/storage/gimi/ResourceImageUncompressed.java index d6efb72c3a..4d7eda597d 100644 --- a/incubator/src/org.apache.sis.storage.gimi/main/org/apache/sis/storage/gimi/ResourceImageUncompressed.java +++ b/incubator/src/org.apache.sis.storage.gimi/main/org/apache/sis/storage/gimi/ResourceImageUncompressed.java @@ -309,7 +309,7 @@ class ResourceImageUncompressed extends TiledGridResource implements StoreResour long[] tileCoord = iterator.getTileCoordinatesInResource(); final WritableRaster raster = iterator.createRaster(); readTile(tileCoord[0], tileCoord[1], raster, Math.toIntExact(tileCoord[0]* tileWidth), Math.toIntExact(tileCoord[1]* tileHeight)); - result[iterator.getTileIndexInResultArray()] = raster; + result[iterator.getTileIndexInResultArray()] = iterator.cache(raster); } } while (iterator.next()); } diff --git a/incubator/src/org.apache.sis.storage.gimi/main/org/apache/sis/storage/gimi/internal/MatrixGridRessource.java b/incubator/src/org.apache.sis.storage.gimi/main/org/apache/sis/storage/gimi/internal/MatrixGridRessource.java index 96bbc5e809..42863eab89 100644 --- a/incubator/src/org.apache.sis.storage.gimi/main/org/apache/sis/storage/gimi/internal/MatrixGridRessource.java +++ b/incubator/src/org.apache.sis.storage.gimi/main/org/apache/sis/storage/gimi/internal/MatrixGridRessource.java @@ -142,7 +142,7 @@ public abstract class MatrixGridRessource extends TiledGridResource { raster = image.getData(); } raster = raster.createTranslatedChild(s.originX, s.originY); - result[iterator.getTileIndexInResultArray()] = raster; + result[iterator.getTileIndexInResultArray()] = iterator.cache(raster); } } while (iterator.next()); }