Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Scratchpad to discuss implementing temporal filter support in GeoTools.

Motivation

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:

  1. A single instance in time (TM_Instant)
  2. A time range or period (TM_Period)

Operation

t1,t2

t1[],t2

t1,t2[]

t1[],t2[]

After

t1 > t2

t1.start > t2

t1 > t2.end

t1.start > t2.end

Before

t1 < t2

t1.end < t2

t1 < t2.start

t1.end < t2.start

Begins

 

 

t1 = t2.start

t1.start = t2.start and t1.end < t2.end

BegunBy

 

t1.start = t2

 

t1.start = t2.start and t1.end > t2.end

TContains

 

t1.start < t2 < t1.end

 

t1.start < t2.start and t2.end < t1.end

During

 

 

t2.start < t1 < t2.end

t1.start > t2.start and t1.end < t2.end

EndedBy

 

t1.end = t2

 

t1.start < t2.start and t1.end = t2.end

Ends

 

 

t1 = t2.end

t1.start > t2.start and t1.end = t2.end

TEquals

t1 = t2

 

 

t1.start = t2.start and t1.end = t2.end

Meets

 

 

 

t1.end = t2.start

MetBy

 

 

 

t1.start = t2.end

TOverlaps

 

 

 

t1.start < t2.start and t1.end > t2.start and t1.end < t2.end

OverlappedBy

 

 

 

t1.start > t2.start and t1.start < t2.end and t1.end > t2.end

AnyInteracts

 

 

 

 

Current GeoTools Temporal Support

The 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.

Feature Model

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.