sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject [sis] branch geoapi-4.0 updated: Query : add linear resolution parameter on SimpleQuery
Date Fri, 15 May 2020 08:58:03 GMT
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 0ac1b4f  Query : add linear resolution parameter on SimpleQuery
0ac1b4f is described below

commit 0ac1b4fb1c90df33919fbd582ca1f1bce811a15f
Author: jsorel <johann.sorel@geomatys.com>
AuthorDate: Fri May 15 10:52:08 2020 +0200

    Query : add linear resolution parameter on SimpleQuery
---
 .../sis/internal/storage/query/SimpleQuery.java    | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/SimpleQuery.java
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/SimpleQuery.java
index 5b327cd..7fca2e3 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/SimpleQuery.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/query/SimpleQuery.java
@@ -21,6 +21,8 @@ import java.util.Map;
 import java.util.List;
 import java.util.LinkedHashMap;
 import java.util.Objects;
+import javax.measure.Quantity;
+import javax.measure.quantity.Length;
 import org.opengis.util.GenericName;
 import org.apache.sis.filter.InvalidExpressionException;
 import org.apache.sis.feature.builder.FeatureTypeBuilder;
@@ -104,6 +106,12 @@ public class SimpleQuery extends Query implements Cloneable {
     private SortBy[] sortBy;
 
     /**
+     * Hint use by resources to optimise returned features.
+     * Different stores makes use of vector tiles of different scales.
+     */
+    private Quantity<Length> linearResolution;
+
+    /**
      * Creates a new query retrieving no column and applying no filter.
      */
     public SimpleQuery() {
@@ -255,6 +263,25 @@ public class SimpleQuery extends Query implements Cloneable {
     }
 
     /**
+     * Set linear resolution hint.
+     * This hing is optional, resources may ignore it.
+     *
+     * @param linearResolution can be null.
+     */
+    public void setLinearResolution(Quantity<Length> linearResolution) {
+        this.linearResolution = linearResolution;
+    }
+
+    /**
+     * Get linear resolution hint.
+     *
+     * @return linear resolution, may be null.
+     */
+    public Quantity<Length> getLinearResolution() {
+        return linearResolution;
+    }
+
+    /**
      * A property or expression to be retrieved by a {@code Query}, together with the name
to assign to it.
      * Columns can be given to the {@link SimpleQuery#setColumns(Column...)} method.
      */


Mime
View raw message