Scratchpad to discuss implementing temporal filter support in GeoTools.
The WFS 2.0 / FES 2.0 specs add support for temporal filter operators for which we don't have any way of representing in geotools.
How does WFS 2.0 / FES 2.0 compare to the CQL standard for representing temporal filters? The words look the same; I expect they are just bringing the capabilities up to par.
Temporal Filter Operators
The following are the list of temporal operators defined by the FES spec. Operations take a mix of two types of operands:
- A single instance in time (TM_Instant)
- A time range or period (TM_Period)
t1 > t2
t1.start > t2
t1 > t2.end
t1.start > t2.end
t1 < t2
t1.end < t2
t1 < t2.start
t1.end < t2.start
t1 = t2.start
t1.start = t2.start and t1.end < t2.end
t1.start = t2
t1.start = t2.start and t1.end > t2.end
t1.start < t2 < t1.end
t1.start < t2.start and t2.end < t1.end
t2.start < t1 < t2.end
t1.start > t2.start and t1.end < t2.end
t1.end = t2
t1.start < t2.start and t1.end = t2.end
t1 = t2.end
t1.start > t2.start and t1.end = t2.end
t1 = t2
t1.start = t2.start and t1.end = t2.end
t1.end = t2.start
t1.start = t2.end
t1.start < t2.start and t1.end > t2.start and t1.end < t2.end
t1.start > t2.start and t1.start < t2.end and t1.end > t2.end
Current GeoTools Temporal Support
gt-opengis model defines the
org.opengis.temporal package which contains a variety of interfaces describing temporal objects which correspond to TM_Instant and TM_Period. The
gt-temporal module contains implementations of them.
How to represent time in our feature model. A single time instant is simple enough, we can represent it with a single
java.util.Date. However representing a time period gets more tricky since it is a complex object and really falls into the realm of app-schema. The question is do we want to limit support for filtering based on period to app-schema? Or do we want to come up with a "simple" convention that can be applied to simple/flat features.