Temporal Filters - STEMLab/geotools GitHub Wiki

Description

The new version of the filter encoding specification (FES 2.0) adds 14 filter operators for temporal filters. 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)

The following table outlines the semantics of the new operators:

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

The gt-temporal module contains classes that implement many of the parts of .... They are used as the basis of implementing above operators.

Status

This proposal is completed.

Tasks

This section is used to make sure your proposal is complete (did you remember documentation?) and has enough paid or volunteer time lined up to be a success

  1. ✅ Roll gt-temporal into gt-main
  2. ✅ Add temporal filter interfaces to gt-opengis
  3. ✅ Implement filter interfaces in gt-main
  4. ✅ Update FilterVisitor implementations
  5. Update wiki module matrix
  6. Add to the upgrade to 8.0 instructions
  7. jg: Update the user guide sphinx docs and java examples

Roll gt-temporal into gt-main

Currently the gt-temporal module sits standalone and is not used by any existing module. To prevent the proliferation of another core module the classes from gt-temporal will be rolled into gt-main.

Add temporal filter interfaces to gt-opengis

The existing filter model interfaces are defined in gt-opengis. Following suite the new filter interfaces will be defined alongside. This involves the core set of interfaces and updates to FilterFactory, FilterVisitor, and FilterCapabilities.

Implement filter interfaces in gt-main

To compliment the new interfaces. The filter operations will utilize gt-temporal classes... most notably TemporalOrder.relativePosition() which is used to compute the relatioships described above between two temporal objects.

Update FilterVisitor implementations

There are a number of filter visitor implementations that require update with the new methods. In some cases where temporal constructs are not supported directly or do not apply to the visitor the new methods will simply throw UnsupportdOperationException.

API Changes

FilterVisitor

BEFORE:

FilterVisitor {
  ...
}

AFTER:

FilterVisitor {
  visit(After)
  visit(Before)
  ...
}

The only breaking change will be the FilterVisitor implementations. All other api changes are additions.

Documentation Changes

⚠️ **GitHub.com Fallback** ⚠️