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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new fb979a4  Add a `TileMatrix.getResolution()` method.
fb979a4 is described below

commit fb979a457b87a5ffd99ecf2344c7cde75787c762
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Mon Mar 28 11:04:14 2022 +0200

    Add a `TileMatrix.getResolution()` method.
---
 .../org/apache/sis/storage/tiling/TileMatrix.java  | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git 
a/storage/sis-storage/src/main/java/org/apache/sis/storage/tiling/TileMatrix.java
 
b/storage/sis-storage/src/main/java/org/apache/sis/storage/tiling/TileMatrix.java
index 91cfadd..1bfd5de 100644
--- 
a/storage/sis-storage/src/main/java/org/apache/sis/storage/tiling/TileMatrix.java
+++ 
b/storage/sis-storage/src/main/java/org/apache/sis/storage/tiling/TileMatrix.java
@@ -56,6 +56,30 @@ public interface TileMatrix {
      */
 
     /**
+     * Returns approximate resolutions (in units of CRS axes) of tiles in this 
tile matrix.
+     * The array length shall be the number of CRS dimensions, and value at 
index <var>i</var>
+     * is the resolution along CRS dimension <var>i</var> in units of the CRS 
axis <var>i</var>.
+     *
+     * <h4>Grid coverage resolution</h4>
+     * If the tiled data is a {@link 
org.apache.sis.coverage.grid.GridCoverage},
+     * then the resolution is the size of pixels (or cells in the 
multi-dimensional case).
+     * If the coverage {@linkplain GridGeometry#getGridToCRS grid to CRS} 
transform is affine,
+     * then that pixel size is constant everywhere.
+     * Otherwise (non-affine transform) the pixel size varies depending on the 
location
+     * and the returned value is the pixel size at some representative point,
+     * typically the coverage center.
+     *
+     * <h4>Vector data resolution</h4>
+     * If the tiled data is a set of features, then the resolution is a 
"typical" distance
+     * (for example the average distance) between points in geometries.
+     *
+     * @return approximate resolutions of tiles.
+     *
+     * @see GridGeometry#getResolution(boolean)
+     */
+    double[] getResolution();
+
+    /**
      * Returns a description about how space is partitioned into individual 
tiled units.
      * The description contains the extent of valid tile indices, the spatial 
reference system,
      * and the conversion from tile indices to the spatial reference system 
coordinates.

Reply via email to