You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by js...@apache.org on 2019/11/26 14:09:21 UTC
[sis] 01/02: SQL/MM : regroup all functions in an internal package
This is an automated email from the ASF dual-hosted git repository.
jsorel pushed a commit to branch feat/sqlmm
in repository https://gitbox.apache.org/repos/asf/sis.git
commit 41cca84038e5bce5f27a1276bdcccbdb370aba54
Author: jsorel <jo...@geomatys.com>
AuthorDate: Tue Nov 26 12:11:44 2019 +0100
SQL/MM : regroup all functions in an internal package
---
.../org/apache/sis/filter/ArithmeticFunction.java | 8 +-
.../java/org/apache/sis/filter/BinaryFunction.java | 1 +
.../org/apache/sis/filter/ComparisonFunction.java | 15 +-
.../java/org/apache/sis/filter/DefaultBBOX.java | 2 +-
.../apache/sis/filter/DefaultFilterFactory.java | 3 +-
.../java/org/apache/sis/filter/DefaultLike.java | 3 +-
.../org/apache/sis/filter/FilterByIdentifier.java | 3 +-
.../sis/filter/InvalidExpressionException.java | 1 +
.../java/org/apache/sis/filter/LeafExpression.java | 5 +-
.../org/apache/sis/filter/LogicalFunction.java | 5 +-
.../java/org/apache/sis/filter/ST_Intersects.java | 187 ---------------------
.../org/apache/sis/filter/SpatialFunction.java | 23 +--
.../org/apache/sis/filter/TemporalFunction.java | 28 +--
.../java/org/apache/sis/filter/UnaryFunction.java | 5 +-
.../sis/{ => internal}/filter/NamedFunction.java | 9 +-
.../org/apache/sis/{ => internal}/filter/Node.java | 10 +-
.../{filter => internal/filter/sqlmm}/SQLMM.java | 8 +-
.../filter/sqlmm}/ST_Buffer.java | 3 +-
.../filter/sqlmm}/ST_Centroid.java | 3 +-
.../filter/sqlmm}/ST_Envelope.java | 3 +-
.../filter/sqlmm}/ST_LineString.java | 3 +-
.../filter/sqlmm}/ST_Point.java | 3 +-
.../filter/sqlmm}/ST_Simplify.java | 3 +-
.../filter/sqlmm}/ST_SimplifyPreserveTopology.java | 3 +-
.../filter/sqlmm}/ST_Transform.java | 3 +-
.../org/apache/sis/filter/BetweenFunctionTest.java | 1 +
.../sis/{ => internal}/filter/SQLMMTest.java | 4 +-
.../apache/sis/test/suite/FeatureTestSuite.java | 2 +-
28 files changed, 91 insertions(+), 256 deletions(-)
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ArithmeticFunction.java b/core/sis-feature/src/main/java/org/apache/sis/filter/ArithmeticFunction.java
index 617849b..44afa99 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ArithmeticFunction.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/ArithmeticFunction.java
@@ -146,7 +146,7 @@ abstract class ArithmeticFunction extends BinaryFunction implements BinaryExpres
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '+';}
/** Applies this expression to the given operands. */
@@ -180,7 +180,7 @@ abstract class ArithmeticFunction extends BinaryFunction implements BinaryExpres
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '−';}
/** Applies this expression to the given operands. */
@@ -214,7 +214,7 @@ abstract class ArithmeticFunction extends BinaryFunction implements BinaryExpres
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '×';}
/** Applies this expression to the given operands. */
@@ -248,7 +248,7 @@ abstract class ArithmeticFunction extends BinaryFunction implements BinaryExpres
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '÷';}
/** Applies this expression to the given operands. */
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/BinaryFunction.java b/core/sis-feature/src/main/java/org/apache/sis/filter/BinaryFunction.java
index 341b9e1..a8a0e1c 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/BinaryFunction.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/BinaryFunction.java
@@ -23,6 +23,7 @@ import java.util.Collection;
import org.opengis.filter.expression.Expression;
+import org.apache.sis.internal.filter.Node;
import org.apache.sis.math.DecimalFunctions;
import org.apache.sis.math.Fraction;
import org.apache.sis.util.ArgumentChecks;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ComparisonFunction.java b/core/sis-feature/src/main/java/org/apache/sis/filter/ComparisonFunction.java
index 21edf62..bd393d8 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ComparisonFunction.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/ComparisonFunction.java
@@ -34,6 +34,7 @@ import java.time.temporal.ChronoField;
import java.time.temporal.Temporal;
import java.util.Arrays;
import java.util.Collection;
+import org.apache.sis.internal.filter.Node;
import org.apache.sis.math.Fraction;
import org.apache.sis.util.ArgumentChecks;
@@ -522,7 +523,7 @@ abstract class ComparisonFunction extends BinaryFunction implements BinaryCompar
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '<';}
/** Converts {@link Comparable#compareTo(Object)} result to this filter result. */
@@ -557,7 +558,7 @@ abstract class ComparisonFunction extends BinaryFunction implements BinaryCompar
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '≤';}
/** Converts {@link Comparable#compareTo(Object)} result to this filter result. */
@@ -592,7 +593,7 @@ abstract class ComparisonFunction extends BinaryFunction implements BinaryCompar
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '>';}
/** Converts {@link Comparable#compareTo(Object)} result to this filter result. */
@@ -627,7 +628,7 @@ abstract class ComparisonFunction extends BinaryFunction implements BinaryCompar
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '≥';}
/** Converts {@link Comparable#compareTo(Object)} result to this filter result. */
@@ -662,7 +663,7 @@ abstract class ComparisonFunction extends BinaryFunction implements BinaryCompar
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '=';}
/** Converts {@link Comparable#compareTo(Object)} result to this filter result. */
@@ -697,7 +698,7 @@ abstract class ComparisonFunction extends BinaryFunction implements BinaryCompar
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '≠';}
/** Converts {@link Comparable#compareTo(Object)} result to this filter result. */
@@ -735,7 +736,7 @@ abstract class ComparisonFunction extends BinaryFunction implements BinaryCompar
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override
protected Collection<?> getChildren() {
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultBBOX.java b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultBBOX.java
index 338e801..e3127b4 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultBBOX.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultBBOX.java
@@ -221,7 +221,7 @@ final class DefaultBBOX extends SpatialFunction implements BBOX, Serializable {
}
@Override
- protected String getName() {
+ public String getName() {
return BBOX.NAME;
}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
index 6c2c9dc..b564dad 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultFilterFactory.java
@@ -60,6 +60,7 @@ import org.apache.sis.internal.system.Modules;
import org.apache.sis.internal.system.SystemListener;
import org.apache.sis.internal.feature.FunctionRegister;
import org.apache.sis.internal.feature.Resources;
+import org.apache.sis.internal.filter.sqlmm.SQLMM;
import org.apache.sis.referencing.CRS;
import org.apache.sis.util.collection.BackingStoreException;
@@ -322,7 +323,7 @@ public class DefaultFilterFactory implements FilterFactory2 {
*/
@Override
public Intersects intersects(final Expression left, final Expression right) {
- return new ST_Intersects(left, right);
+ return new SpatialFunction.Intersects(left, right);
}
/**
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultLike.java b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultLike.java
index 97527c6..6963bda 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultLike.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/DefaultLike.java
@@ -18,6 +18,7 @@ package org.apache.sis.filter;
import java.util.Arrays;
import java.util.Collection;
+import org.apache.sis.internal.filter.Node;
import org.opengis.filter.FilterVisitor;
import org.opengis.filter.PropertyIsLike;
import org.opengis.filter.expression.Expression;
@@ -49,7 +50,7 @@ final class DefaultLike extends Node implements PropertyIsLike {
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/FilterByIdentifier.java b/core/sis-feature/src/main/java/org/apache/sis/filter/FilterByIdentifier.java
index 511b404..d0af27c 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/FilterByIdentifier.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/FilterByIdentifier.java
@@ -24,6 +24,7 @@ import java.util.Collection;
import java.util.Collections;
import org.apache.sis.util.collection.Containers;
import org.apache.sis.internal.feature.AttributeConvention;
+import org.apache.sis.internal.filter.Node;
// Branch-dependent imports
import org.opengis.feature.Feature;
@@ -69,7 +70,7 @@ final class FilterByIdentifier extends Node implements Id {
* Returns a name identifying this kind of filter.
*/
@Override
- protected String getName() {
+ public String getName() {
return "Id";
}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/InvalidExpressionException.java b/core/sis-feature/src/main/java/org/apache/sis/filter/InvalidExpressionException.java
index c5367a1..2a3ba68 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/InvalidExpressionException.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/InvalidExpressionException.java
@@ -18,6 +18,7 @@ package org.apache.sis.filter;
import org.opengis.filter.expression.Expression;
import org.apache.sis.internal.feature.Resources;
+import org.apache.sis.internal.filter.Node;
import org.apache.sis.util.Classes;
import org.apache.sis.util.Workaround;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/LeafExpression.java b/core/sis-feature/src/main/java/org/apache/sis/filter/LeafExpression.java
index 0133a03..ef2affd 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/LeafExpression.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/LeafExpression.java
@@ -26,6 +26,7 @@ import org.apache.sis.util.ObjectConverters;
import org.apache.sis.util.UnconvertibleObjectException;
import org.apache.sis.util.collection.WeakValueHashMap;
import org.apache.sis.internal.feature.FeatureExpression;
+import org.apache.sis.internal.filter.Node;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
@@ -107,7 +108,7 @@ abstract class LeafExpression extends Node implements Expression, FeatureExpress
}
/** Identification of this expression. */
- @Override protected String getName() {
+ @Override public String getName() {
return "PropertyName";
}
@@ -196,7 +197,7 @@ abstract class LeafExpression extends Node implements Expression, FeatureExpress
}
/** Identification of this expression. */
- @Override protected String getName() {
+ @Override public String getName() {
return "Literal";
}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/LogicalFunction.java b/core/sis-feature/src/main/java/org/apache/sis/filter/LogicalFunction.java
index b93019e..caea1af 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/LogicalFunction.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/LogicalFunction.java
@@ -20,6 +20,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.Collection;
import org.apache.sis.util.ArgumentChecks;
+import org.apache.sis.internal.filter.Node;
import org.apache.sis.internal.util.UnmodifiableArrayList;
// Branch-dependent imports
@@ -104,7 +105,7 @@ abstract class LogicalFunction extends Node {
}
/** Returns a name for this filter. */
- @Override protected String getName() {return "And";}
+ @Override public String getName() {return "And";}
@Override protected char symbol() {return filters.length <= 2 ? '∧' : '⋀';}
/** Implementation of the visitor pattern. */
@@ -137,7 +138,7 @@ abstract class LogicalFunction extends Node {
}
/** Returns a name for this filter. */
- @Override protected String getName() {return "Or";}
+ @Override public String getName() {return "Or";}
@Override protected char symbol() {return filters.length <= 2 ? '∨' : '⋁';}
/** Implementation of the visitor pattern. */
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Intersects.java b/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Intersects.java
deleted file mode 100644
index 9d0bd2c..0000000
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Intersects.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * 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.filter;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.AbstractMap;
-import java.util.Map;
-import java.util.function.Predicate;
-
-import org.opengis.filter.FilterVisitor;
-import org.opengis.filter.expression.Expression;
-import org.opengis.filter.expression.Literal;
-import org.opengis.filter.spatial.Intersects;
-import org.opengis.geometry.Geometry;
-import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.opengis.referencing.operation.CoordinateOperation;
-import org.opengis.referencing.operation.TransformException;
-import org.opengis.util.FactoryException;
-
-import org.apache.sis.internal.feature.GeometryWrapper;
-import org.apache.sis.internal.feature.jts.JTS;
-import org.apache.sis.util.collection.BackingStoreException;
-
-import org.locationtech.jts.geom.prep.PreparedGeometry;
-import org.locationtech.jts.geom.prep.PreparedGeometryFactory;
-
-import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
-
-/**
- * TODO: refine once Geometry API is stable.
- *
- * @author Alexis Manin (Geomatys)
- * @version 2.0
- * @since 2.0
- * @module
- */
-public final class ST_Intersects extends SpatialFunction implements Intersects, Serializable {
-
- public static final String NAME = "ST_Intersects";
-
- final Expression left;
- final Expression right;
-
- private transient Predicate intersects;
-
- public ST_Intersects(Expression left, Expression right) {
- super(left, right);
- this.left = left;
- this.right = right;
- init();
- }
-
- private void init() {
- ensureNonNull("Left operand", left);
- ensureNonNull("Right operand", right);
- if (left instanceof Literal && right instanceof Literal) {
- final boolean constantResult = nonOptimizedIntersects(null);
- intersects = it -> constantResult;
- } else if (left instanceof Literal) {
- intersects = intersect((Literal) left, right);
- } else if (right instanceof Literal) {
- intersects = intersect((Literal) right, left);
- } else intersects = this::nonOptimizedIntersects;
- }
-
- private boolean nonOptimizedIntersects(Object candidate) {
- final Object leftEval = left.evaluate(candidate);
- final Object rightEval = right.evaluate(candidate);
- if (leftEval == null || rightEval == null) return false;
-
- final Map.Entry<org.locationtech.jts.geom.Geometry, CoordinateReferenceSystem> leftEntry = toJTS(leftEval);
- final Map.Entry<org.locationtech.jts.geom.Geometry, CoordinateReferenceSystem> rightEntry = toJTS(rightEval);
- final CRSMatching.Match match = CRSMatching.left(leftEntry.getValue()).right(rightEntry.getValue());
-
- final org.locationtech.jts.geom.Geometry leftGeom = match.fromLeft()
- .map(op -> transformSilently(leftEntry.getKey(), op))
- .orElse(leftEntry.getKey());
- final org.locationtech.jts.geom.Geometry rightGeom = match.fromRight()
- .map(op -> transformSilently(rightEntry.getKey(), op))
- .orElse(rightEntry.getKey());
-
- return leftGeom.intersects(rightGeom);
- }
-
- private static org.locationtech.jts.geom.Geometry transformSilently(org.locationtech.jts.geom.Geometry target, CoordinateOperation op) {
- try {
- return JTS.transform(target, op);
- } catch (TransformException | FactoryException e) {
- throw new BackingStoreException(e);
- }
- }
-
- private static Map.Entry<org.locationtech.jts.geom.Geometry, CoordinateReferenceSystem> toJTS(Object value) {
- CoordinateReferenceSystem crs = null;
- if (value instanceof Geometry) crs = ((Geometry) value).getCoordinateReferenceSystem();
- if (value instanceof GeometryWrapper) value = ((GeometryWrapper) value).geometry;
- if (value instanceof org.locationtech.jts.geom.Geometry) {
- final org.locationtech.jts.geom.Geometry geom = (org.locationtech.jts.geom.Geometry) value;
- if (crs == null) {
- try {
- crs = JTS.getCoordinateReferenceSystem(geom);
- } catch (FactoryException e) {
- throw new BackingStoreException("Cannot extract CRS from operand", e);
- }
- }
- return new AbstractMap.SimpleImmutableEntry<>(geom, crs);
- }
- throw new UnsupportedOperationException("Unsupported geometry type: "+value.getClass().getCanonicalName());
- }
-
- private static Predicate intersect(Literal left, Expression right) {
- Object value = left.getValue();
- ensureNonNull("Literal value", value);
- // TODO: make more consistent strategy once Geometry API is stable.
- try {
- final Map.Entry<org.locationtech.jts.geom.Geometry, CoordinateReferenceSystem> leftEntry = toJTS(value);
- final CRSMatching crsMatching = CRSMatching.left(leftEntry.getValue());
- final PreparedGeometry optimizedGeom = new PreparedGeometryFactory().create((org.locationtech.jts.geom.Geometry) value);
- return it -> {
- Object val = right.evaluate(it);
- if (val == null) return false;
- final Map.Entry<org.locationtech.jts.geom.Geometry, CoordinateReferenceSystem> rightEntry = toJTS(val);
- final CRSMatching.Match match = crsMatching.right(rightEntry.getValue());
- final org.locationtech.jts.geom.Geometry rightGeom = match.fromRight()
- .map(op -> transformSilently(rightEntry.getKey(), op))
- .orElse(rightEntry.getKey());
- return match.fromLeft()
- .map(op -> transformSilently(leftEntry.getKey(), op))
- .map(geom -> geom.intersects(rightGeom))
- .orElseGet(() -> optimizedGeom.intersects(rightGeom));
- };
- } catch (UnsupportedOperationException e) {
- if (value instanceof Geometry) {
- final Geometry geom = (Geometry) value;
- return it -> {
- final Geometry newVal = left.evaluate(it, Geometry.class);
- if (newVal == null) {
- final Object testVal = left.evaluate(it);
- if (testVal == null) return false;
- throw new UnsupportedOperationException("Unsupported geometry type: "+testVal.getClass().getCanonicalName());
- }
- return geom.intersects(newVal);
- };
- }
- }
- throw new UnsupportedOperationException("Unsupported geometry type: "+value.getClass().getCanonicalName());
- }
-
- @Override
- public boolean evaluate(Object object) {
- return intersects.test(object);
- }
-
- @Override
- public Object accept(FilterVisitor visitor, Object extraData) {
- return visitor.visit(this, extraData);
- }
-
- @Override
- protected String getName() {
- return org.opengis.filter.spatial.Intersects.NAME;
- }
-
- /**
- * Initialize this filter state. It is necessary because of serialization compliance.
- */
- private void readObject(java.io.ObjectInputStream stream)
- throws IOException, ClassNotFoundException {
- stream.defaultReadObject();
- init();
- }
-}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/SpatialFunction.java b/core/sis-feature/src/main/java/org/apache/sis/filter/SpatialFunction.java
index 205764b..c24f096 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/SpatialFunction.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/SpatialFunction.java
@@ -36,6 +36,7 @@ import org.opengis.util.FactoryException;
import org.apache.sis.coverage.grid.GridCoverage;
import org.apache.sis.internal.feature.AttributeConvention;
import org.apache.sis.internal.feature.Geometries;
+import org.apache.sis.internal.feature.GeometryWrapper;
import org.apache.sis.internal.feature.WrapResolution;
import org.apache.sis.math.Fraction;
import org.apache.sis.measure.Units;
@@ -112,6 +113,8 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
value = exp.evaluate(object);
}
+ if (value instanceof GeometryWrapper) value = ((GeometryWrapper) value).geometry;
+
Geometry candidate;
if (value instanceof GridCoverage) {
//use the coverage envelope
@@ -249,7 +252,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -314,7 +317,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -367,7 +370,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -421,7 +424,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -482,7 +485,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -547,7 +550,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -594,7 +597,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -647,7 +650,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -700,7 +703,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
@@ -746,7 +749,7 @@ abstract class SpatialFunction extends BinaryFunction implements BinarySpatialOp
}
@Override
- protected String getName() {
+ public String getName() {
return NAME;
}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/TemporalFunction.java b/core/sis-feature/src/main/java/org/apache/sis/filter/TemporalFunction.java
index 61c9e24..7fb081a 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/TemporalFunction.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/TemporalFunction.java
@@ -221,7 +221,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '=';}
/** Condition defined by ISO 19108:2002 §5.2.3.5. */
@@ -266,7 +266,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '<';}
/** Condition defined by ISO 19108:2002 §5.2.3.5. */
@@ -309,7 +309,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '>';}
/** Condition defined by ISO 19108:2002 §5.2.3.5. */
@@ -350,7 +350,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Condition defined by ISO 19108:2006 (corrigendum) §5.2.3.5. */
@Override public boolean evaluate(final Period self, final Period other) {
@@ -381,7 +381,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Condition defined by ISO 19108:2006 (corrigendum) §5.2.3.5. */
@Override public boolean evaluate(final Period self, final Period other) {
@@ -413,7 +413,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Condition defined by ISO 19108:2006 (corrigendum) §5.2.3.5. */
@Override public boolean evaluate(final Period self, final Instant other) {
@@ -450,7 +450,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Condition defined by ISO 19108:2006 (corrigendum) §5.2.3.5. */
@Override public boolean evaluate(final Period self, final Instant other) {
@@ -486,7 +486,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Extension to ISO 19108: handle instant as a tiny period. */
@Override public boolean evaluate(final Instant self, final Instant other) {
@@ -526,7 +526,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Extension to ISO 19108: handle instant as a tiny period. */
@Override public boolean evaluate(final Instant self, final Instant other) {
@@ -566,7 +566,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '⊊';} // `self` is a proper (or strict) subset of `other`.
/** Condition defined by ISO 19108:2006 (corrigendum) §5.2.3.5. */
@@ -599,7 +599,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '⊋';} // `self` is a proper (or strict) superset of `other`.
/** Condition defined by ISO 19108:2006 (corrigendum) §5.2.3.5. */
@@ -637,7 +637,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Condition defined by ISO 19108:2006 (corrigendum) §5.2.3.5. */
@Override public boolean evaluate(final Period self, final Period other) {
@@ -671,7 +671,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Implementation of the visitor pattern (not used by Apache SIS). */
@Override public Object accept(FilterVisitor visitor, Object extraData) {
@@ -703,7 +703,7 @@ abstract class TemporalFunction extends BinaryFunction implements BinaryTemporal
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
/** Condition defined by OGC filter specification. */
@Override public boolean evaluate(final Period self, final Period other) {
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/UnaryFunction.java b/core/sis-feature/src/main/java/org/apache/sis/filter/UnaryFunction.java
index c9621ba..b5a1a49 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/UnaryFunction.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/filter/UnaryFunction.java
@@ -19,6 +19,7 @@ package org.apache.sis.filter;
import java.io.Serializable;
import java.util.Collection;
import java.util.Collections;
+import org.apache.sis.internal.filter.Node;
import org.apache.sis.util.ArgumentChecks;
import org.opengis.filter.Filter;
@@ -112,7 +113,7 @@ abstract class UnaryFunction extends Node implements Serializable {
}
/** Identification of this operation. */
- @Override protected String getName() {return NAME;}
+ @Override public String getName() {return NAME;}
@Override protected char symbol() {return '∅';}
/** Returns {@code true} if the given value evaluates to {@code null}. */
@@ -144,7 +145,7 @@ abstract class UnaryFunction extends Node implements Serializable {
}
/** Identification of this operation. */
- @Override protected String getName() {return "Not";}
+ @Override public String getName() {return "Not";}
@Override protected char symbol() {return '¬';}
/** Returns the singleton filter used by this operation. */
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/NamedFunction.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/NamedFunction.java
similarity index 96%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/NamedFunction.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/NamedFunction.java
index 47cda5b..bd2d7bc 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/NamedFunction.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/NamedFunction.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter;
import java.util.List;
import java.util.Collection;
@@ -33,6 +33,7 @@ import org.apache.sis.internal.feature.FeatureExpression;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
import org.apache.sis.feature.builder.AttributeTypeBuilder;
+import org.apache.sis.filter.InvalidExpressionException;
/**
@@ -55,7 +56,7 @@ import org.apache.sis.feature.builder.AttributeTypeBuilder;
* @since 1.1
* @module
*/
-abstract class NamedFunction extends Node implements Function {
+public abstract class NamedFunction extends Node implements Function {
/**
* For cross-version compatibility.
*/
@@ -76,7 +77,7 @@ abstract class NamedFunction extends Node implements Function {
*
* @param parameters the sub-expressions that will be evaluated to provide the parameters to the function.
*/
- NamedFunction(final Expression[] parameters) {
+ public NamedFunction(final Expression[] parameters) {
this.parameters = UnmodifiableArrayList.wrap(parameters);
}
@@ -188,7 +189,7 @@ abstract class NamedFunction extends Node implements Function {
* @throws InvalidExpressionException if this method can not determine the result type of the expression
* at given index. It may be because that expression is backed by an unsupported implementation.
*/
- final AttributeTypeBuilder<?> copyGeometryType(final FeatureType valueType, final FeatureTypeBuilder addTo) {
+ public final AttributeTypeBuilder<?> copyGeometryType(final FeatureType valueType, final FeatureTypeBuilder addTo) {
final PropertyTypeBuilder type = copyType(0, valueType, addTo);
if (type instanceof AttributeTypeBuilder<?>) {
AttributeTypeBuilder<?> att = (AttributeTypeBuilder<?>) type;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/Node.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/Node.java
similarity index 95%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/Node.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/Node.java
index daea5fa..7fd8b35 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/Node.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/Node.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter;
import java.util.Map;
import java.util.IdentityHashMap;
@@ -45,7 +45,7 @@ import org.opengis.filter.BinaryLogicOperator;
* @since 1.1
* @module
*/
-abstract class Node implements Serializable {
+public abstract class Node implements Serializable {
/**
* For cross-version compatibility.
*/
@@ -65,7 +65,7 @@ abstract class Node implements Serializable {
* @param name name of the attribute to create.
* @return an attribute of the given type and name.
*/
- static <T> AttributeType<T> createType(final Class<T> type, final Object name) {
+ protected static <T> AttributeType<T> createType(final Class<T> type, final Object name) {
return new DefaultAttributeType<>(Collections.singletonMap(DefaultAttributeType.NAME_KEY, name),
type, 1, 1, null, (AttributeType<?>[]) null);
}
@@ -87,7 +87,7 @@ abstract class Node implements Serializable {
*
* @return the name of this node.
*/
- protected abstract String getName();
+ public abstract String getName();
/**
* Returns the children of this node, or an empty collection if none. This is used
@@ -168,7 +168,7 @@ abstract class Node implements Serializable {
*
* @see <a href="https://issues.apache.org/jira/browse/SIS-460">SIS-460</a>
*/
- final void warning(final Exception e) {
+ public final void warning(final Exception e) {
Logging.recoverableException(Logging.getLogger(Loggers.FILTER), getClass(), "evaluate", e);
}
}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/SQLMM.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/SQLMM.java
similarity index 93%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/SQLMM.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/SQLMM.java
index ab3e3b5..171506c 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/SQLMM.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/SQLMM.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import java.util.Arrays;
import java.util.Collection;
@@ -39,7 +39,7 @@ import org.locationtech.jts.geom.GeometryFactory;
* @since 1.1
* @module
*/
-final class SQLMM implements FunctionRegister {
+public final class SQLMM implements FunctionRegister {
/**
* JTS factory used by multiple functions.
@@ -49,7 +49,7 @@ final class SQLMM implements FunctionRegister {
/**
* Creates the default register.
*/
- SQLMM() {
+ public SQLMM() {
}
/**
@@ -69,7 +69,6 @@ final class SQLMM implements FunctionRegister {
ST_Buffer.NAME,
ST_Centroid.NAME,
ST_Envelope.NAME,
- //ST_Intersects.NAME, TODO fixme, this class is not a proper function
ST_Point.NAME,
ST_LineString.NAME,
ST_Simplify.NAME,
@@ -98,7 +97,6 @@ final class SQLMM implements FunctionRegister {
case ST_Buffer.NAME: return new ST_Buffer(parameters);
case ST_Centroid.NAME: return new ST_Centroid(parameters);
case ST_Envelope.NAME: return new ST_Envelope(parameters);
- //case ST_Intersects.NAME: return new ST_Intersects(parameters);
case ST_Point.NAME: return new ST_Point(parameters);
case ST_LineString.NAME: return new ST_LineString(parameters);
case ST_Simplify.NAME: return new ST_Simplify(parameters);
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Buffer.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Buffer.java
similarity index 97%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/ST_Buffer.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Buffer.java
index b2a8652..b84c18b 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Buffer.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Buffer.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import org.apache.sis.feature.builder.AttributeTypeBuilder;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
+import org.apache.sis.internal.filter.NamedFunction;
import org.apache.sis.internal.feature.FeatureExpression;
import org.apache.sis.internal.feature.Geometries;
import org.apache.sis.util.ArgumentChecks;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Centroid.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Centroid.java
similarity index 97%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/ST_Centroid.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Centroid.java
index ec9d7bf..525b04f 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Centroid.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Centroid.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import org.apache.sis.feature.builder.AttributeTypeBuilder;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
+import org.apache.sis.internal.filter.NamedFunction;
import org.apache.sis.internal.feature.FeatureExpression;
import org.apache.sis.internal.feature.Geometries;
import org.apache.sis.util.ArgumentChecks;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Envelope.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Envelope.java
similarity index 98%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/ST_Envelope.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Envelope.java
index 5e57ac7..d8a34d6 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Envelope.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Envelope.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import java.util.Collections;
import java.util.function.Function;
@@ -33,6 +33,7 @@ import org.apache.sis.feature.DefaultAttributeType;
import org.apache.sis.feature.Features;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
+import org.apache.sis.internal.filter.NamedFunction;
import org.apache.sis.geometry.GeneralEnvelope;
import org.apache.sis.geometry.ImmutableEnvelope;
import org.apache.sis.internal.feature.AttributeConvention;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_LineString.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_LineString.java
similarity index 98%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/ST_LineString.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_LineString.java
index 03359ce..c05ab4b 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_LineString.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_LineString.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import java.util.ArrayList;
import java.util.Arrays;
@@ -24,6 +24,7 @@ import java.util.List;
import org.apache.sis.feature.builder.AttributeTypeBuilder;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
+import org.apache.sis.internal.filter.NamedFunction;
import org.apache.sis.internal.feature.FeatureExpression;
import org.apache.sis.referencing.CRS;
import org.locationtech.jts.geom.Coordinate;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Point.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Point.java
similarity index 97%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/ST_Point.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Point.java
index a77b836..bbdf568 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Point.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Point.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import org.apache.sis.feature.builder.AttributeTypeBuilder;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
+import org.apache.sis.internal.filter.NamedFunction;
import org.apache.sis.internal.feature.FeatureExpression;
import org.apache.sis.referencing.CRS;
import org.locationtech.jts.geom.Coordinate;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Simplify.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Simplify.java
similarity index 97%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/ST_Simplify.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Simplify.java
index 2a7c0a8..7cb09ea 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Simplify.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Simplify.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import org.apache.sis.feature.builder.AttributeTypeBuilder;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
+import org.apache.sis.internal.filter.NamedFunction;
import org.apache.sis.internal.feature.FeatureExpression;
import org.apache.sis.internal.feature.Geometries;
import org.apache.sis.util.ArgumentChecks;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_SimplifyPreserveTopology.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_SimplifyPreserveTopology.java
similarity index 97%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/ST_SimplifyPreserveTopology.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_SimplifyPreserveTopology.java
index 4b9b75d..e264326 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_SimplifyPreserveTopology.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_SimplifyPreserveTopology.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import org.apache.sis.feature.builder.AttributeTypeBuilder;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
+import org.apache.sis.internal.filter.NamedFunction;
import org.apache.sis.internal.feature.FeatureExpression;
import org.apache.sis.internal.feature.Geometries;
import org.apache.sis.util.ArgumentChecks;
diff --git a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Transform.java b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Transform.java
similarity index 98%
rename from core/sis-feature/src/main/java/org/apache/sis/filter/ST_Transform.java
rename to core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Transform.java
index ed29ce8..986a6e9 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/filter/ST_Transform.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/filter/sqlmm/ST_Transform.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter.sqlmm;
import java.util.Objects;
import java.io.IOException;
@@ -28,6 +28,7 @@ import org.opengis.referencing.operation.TransformException;
import org.opengis.util.FactoryException;
import org.apache.sis.feature.builder.PropertyTypeBuilder;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
+import org.apache.sis.internal.filter.NamedFunction;
import org.apache.sis.internal.feature.FeatureExpression;
import org.apache.sis.internal.feature.Geometries;
import org.apache.sis.internal.util.Constants;
diff --git a/core/sis-feature/src/test/java/org/apache/sis/filter/BetweenFunctionTest.java b/core/sis-feature/src/test/java/org/apache/sis/filter/BetweenFunctionTest.java
index e313ae0..2fd75af 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/filter/BetweenFunctionTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/filter/BetweenFunctionTest.java
@@ -18,6 +18,7 @@ package org.apache.sis.filter;
import org.opengis.filter.FilterFactory;
import org.opengis.filter.expression.Literal;
+import org.apache.sis.internal.filter.Node;
import org.apache.sis.test.TestCase;
import org.junit.Test;
diff --git a/core/sis-feature/src/test/java/org/apache/sis/filter/SQLMMTest.java b/core/sis-feature/src/test/java/org/apache/sis/internal/filter/SQLMMTest.java
similarity index 99%
rename from core/sis-feature/src/test/java/org/apache/sis/filter/SQLMMTest.java
rename to core/sis-feature/src/test/java/org/apache/sis/internal/filter/SQLMMTest.java
index 2491ea0..c437032 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/filter/SQLMMTest.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/internal/filter/SQLMMTest.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sis.filter;
+package org.apache.sis.internal.filter;
import java.util.Arrays;
import org.opengis.feature.Feature;
@@ -30,8 +30,10 @@ import org.opengis.referencing.crs.GeographicCRS;
import org.opengis.referencing.crs.ProjectedCRS;
import org.apache.sis.feature.builder.FeatureTypeBuilder;
+import org.apache.sis.filter.DefaultFilterFactory;
import org.apache.sis.geometry.GeneralEnvelope;
import org.apache.sis.internal.feature.jts.JTS;
+import org.apache.sis.internal.filter.sqlmm.ST_Envelope;
import org.apache.sis.referencing.CRS;
import org.apache.sis.referencing.CommonCRS;
import org.apache.sis.referencing.crs.HardCodedCRS;
diff --git a/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java b/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
index b735d58..6ccacf2 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/test/suite/FeatureTestSuite.java
@@ -61,7 +61,7 @@ import org.junit.runners.Suite;
org.apache.sis.filter.LikeFunctionTest.class,
org.apache.sis.filter.SpatialFunctionTest.class,
org.apache.sis.filter.TemporalFunctionTest.class,
- org.apache.sis.filter.SQLMMTest.class,
+ org.apache.sis.internal.filter.SQLMMTest.class,
org.apache.sis.internal.feature.AttributeConventionTest.class,
org.apache.sis.internal.feature.j2d.ShapePropertiesTest.class,
org.apache.sis.internal.feature.Java2DTest.class,