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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new 83ec1c5135 feat(TileMatrix): add a first version of TileMatrixStatus
83ec1c5135 is described below

commit 83ec1c5135783cfa585b0012802817ed2d44b730
Author: jsorel <[email protected]>
AuthorDate: Fri Jul 17 17:02:55 2026 +0200

    feat(TileMatrix): add a first version of TileMatrixStatus
---
 .../org/apache/sis/storage/tiling/TileMatrix.java  | 10 +++++
 .../sis/storage/tiling/TileMatrixStatus.java       | 48 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrix.java
 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrix.java
index e3e8abcc67..92e6781dd0 100644
--- 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrix.java
+++ 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrix.java
@@ -197,6 +197,16 @@ public interface TileMatrix {
      */
     TileStatus getTileStatus(long... indices) throws DataStoreException;
 
+    /**
+     * Query the matrix for information on where data can be found.
+     *
+     * @param region searched region, null for the complete tiling scheme.
+     * @throws DataStoreException  if fetching the tile status failed.
+     */
+    default Optional<TileMatrixStatus> getTileStatus(GridExtent region) throws 
DataStoreException {
+        return Optional.empty();
+    }
+
     /**
      * Gets a tile at the given indices.
      *
diff --git 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrixStatus.java
 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrixStatus.java
new file mode 100644
index 0000000000..7a0c85af11
--- /dev/null
+++ 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/tiling/TileMatrixStatus.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.tiling;
+
+import java.util.stream.Stream;
+import org.apache.sis.coverage.grid.GridExtent;
+import org.apache.sis.storage.DataStoreException;
+
+/**
+ * Data region description.
+ *
+ * Note : this class is in early stage and may evolve or be renamed.
+ *
+ * @author Johann Sorel (Geomatys)
+ * @version 2.0
+ * @since   2.0
+ */
+public abstract class TileMatrixStatus {
+
+    /**
+     * Query the matrix for a list of extents where tiles exist.
+     * <ul>
+     *   <li>All tiles in the matrix are guaranted to be included in those 
extents.</li>
+     *   <li>The returned extents may contain missing tiles.</li>
+     *   <li>An empty stream means the tilematrix is guaranted to be 
empty.</li>
+     *   <li>An empty optional means the information is too expensive to 
compute or is not available.
+     *      Therefor no assumption should be made and tiles may be anywhere on 
the TileMatrix.
+     *   </li>
+     * </ul>
+     * @return stream of extent where tiles exists, empty optional if the 
information is too expensive to compute
+     *        or is not available.
+     */
+    public abstract Stream<GridExtent> toGridExtents() throws 
DataStoreException;
+}

Reply via email to