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

commit 044bd2f6067379a8ce7ea9a3589ee444c4469504
Author: jsorel <johann.so...@geomatys.com>
AuthorDate: Tue Jul 30 12:15:29 2024 +0200

    Add method in TiledGridCoverage.AOI to get tile position in original 
coverage
---
 .../main/org/apache/sis/storage/base/TiledGridCoverage.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/TiledGridCoverage.java
 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/TiledGridCoverage.java
index 2313b9c515..29736007ca 100644
--- 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/TiledGridCoverage.java
+++ 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/base/TiledGridCoverage.java
@@ -585,6 +585,17 @@ public abstract class TiledGridCoverage extends 
GridCoverage {
             return TiledGridCoverage.this;
         }
 
+        /**
+         * Returns the current iterator tile position in the original coverage 
resource.
+         *
+         * @return current iterator tile position in original coverage 
resource.
+         */
+        public final long[] getPositionInSource() {
+            final long[] coordinate = new long[tmcOfFirstTile.length];
+            for (int i = 0; i < coordinate.length; i++) coordinate[i] = 
(long)tmcOfFirstTile[i] + tmcInSubset[i];
+            return coordinate;
+        }
+
         /**
          * Returns the current iterator position as an index in the array of 
tiles to be returned
          * by {@link #readTiles(AOI)}. The initial position is zero.

Reply via email to