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:

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

Defined in the sis-feature module