Package org.apache.sis.filter
package org.apache.sis.filter
Filters features according their properties.
A filter expression is a construct used to constraint a feature set to a subset.
Operations in this package follow the rules of
OGC® Filter Encoding and
ISO 13249-3 - SQLMM standards.
Coordinate reference system handling
Filters and expressions may contain heterogeneous coordinate reference systems. Apache SIS tries to handle differences in the following way:- If at least one geometry does not has a CRS, then SIS assumes that the geometries are in the same space.
- If all geometries are in the same CRS, no coordinate operation is applied.
- If geometries have non-null but different CRS, then SIS tries to project the geometries in a common space:
- For SQLMM operations, the CRS of the first operand is used (as required by the specification).
- For other operations, the common CRS is chosen by
referencing utility method.
If that method cannot provide a common space,
then an
IllegalArgumentException
is thrown.
Performance tips
In expressions like ST_Intersects(A,B)
where the A and B parameters are two
sub-expressions evaluating to geometry values, if one of those expressions is a literal, then that literal
should be B. The reason is because SQLMM specification requires us to project B
in the Coordinate Reference System of A. If B is a literal, Apache SIS can do
this transformation only once before to start any evaluation instead of every time that the expression
needs to be evaluated.
Data store implementations should apply Optimization
on the filters
before to evaluate them.
Thread-safety
All filter and expression implementations provided by Apache SIS are thread-safe. They are not necessarily stateless however; for example a filter may remember which warnings have been reported in order to avoid to report the same warning twice.- Since:
- 1.1
- Version:
- 1.2
-
ClassDescriptionArithmetic operations between two numerical values.The "Add" (+) expression.The "Divide" (÷) expression.The "Multiply" (×) expression.The "Subtract" (−) expression.Expression whose value is computed by retrieving the value indicated by the provided path.BinaryFunction<R,
V1, V2> Base class for expressions, comparators or filters performing operations on two expressions.BinaryGeometryFilter<R,G> Base class for filters having two expressions evaluating to geometries.BinarySpatialFilter<R,G> Spatial operations between two geometries.Comparison operators between two values.The"PropertyIsBetween"
filter.The"PropertyIsEqualTo"
(=) filter.The"PropertyIsGreaterThan"
(>) filter.The"PropertyIsGreaterThanOrEqualTo"
(≥) filter.The"PropertyIsLessThan"
(<) filter.The"PropertyIsLessThanOrEqualTo"
(≤) filter.The"PropertyIsNotEqualTo"
(≠) filter.ConvertFunction<R,S, V> Expression whose results are converted to a different type.DefaultFilterFactory<R,G, T> A factory of defaultFilter
andExpression
implementations.A filter factory operating onAbstractFeature
instances.Defines a sort order based on a property and ascending/descending order.DistanceFilter<R,G> Spatial operations between two geometries and using a distance.Expression<R,V> A literal or a named procedure that performs a distinct computation.Filter<R>Identification of a subset of resources from a collection of resources whose property values satisfy a set of logically connected predicates.Placeholder for GeoAPI 3.1 interfaces (not yet released).Placeholder for GeoAPI 3.1 interfaces (not yet released).FilterNode<R>Base class of some (not all) nodes that are filters.IdentifierFilter<R extends AbstractFeature>Filter features using a set of predefined identifiers and discarding features whose identifier is not in the set.LeafExpression<R,V> Expressions that do not depend on any other expression.A constant, literal value that can be used in expressions.A literal value which is the result of transforming another literal.LikeFilter<R>A character string comparison operator with pattern matching.Logical filter (AND, OR) using an arbitrary number of operands.The "And" operation (⋀).The negation filter (¬).The "Or" operation (⋁).Description of optimizations or simplifications to attempt on filters and expressions.Expression that can be optimized.Filter that can be optimized.Expression whose value is computed by retrieving the value indicated by the provided name.An expression fetching property values asObject
.An expression fetching property values as an object of specified type.An expression fetching property values as an object of specified type.Temporal operations between a period and an instant.The"After"
(>) filter.The"AnyInteracts"
filter.The"Before"
(<) filter.The"Begins"
filter.The"BegunBy"
filter.The"TContains"
filter.The"During"
filter.The"EndedBy"
filter.The"Ends"
filter.The"TEquals"
(=) filter.The"Meets"
filter.The"MetBy"
filter.The"OverlappedBy"
filter.The"TOverlaps"
filter.UnaryFunction<R,V> Base class for expressions, comparators or filters performing operations on one expressions.Filter operator that checks if an expression's value is nil.Filter operator that checks if an expression's value isnull
.Basic support of X-Path inPropertyValue
expression.