DDF Filter Profile
Role of the OGC Filter
Both Queries and Subscriptions extend the OGC GeoAPI Filter interface.
The Filter Builder and Adapter do not fully implement the OGC Filter Specification. The filter support profile contains suggested filter to Metacard type mappings. For example, even though a Source could support a PropertyIsGreaterThan filter on XML_TYPE, it would not likely be useful.
Catalog Filter Profile
Metacard Attribute To Type Mapping
The filter profile maps filters to Metacard types. Below is a table of the common Metacard Attributes with their respective types for reference.
Metacard Attribute | Metacard Type |
---|---|
ANY_DATE | DATE_TYPE |
ANY_GEO | GEO_TYPE |
ANY_TEXT | STRING_TYPE |
CONTENT_TYPE | STRING_TYPE |
CONTENT_TYPE_VERSION | STRING_TYPE |
CREATED | DATE_TYPE |
EFFECTIVE | DATE_TYPE |
GEOGRAPHY | GEO_TYPE |
ID | STRING_TYPE |
METADATA | XML_TYPE |
MODIFIED | DATE_TYPE |
RESOURCE_SIZE | STRING_TYPE |
RESOURCE_URI | STRING_TYPE |
SOURCE_ID | STRING_TYPE |
TARGET_NAMESPACE | STRING_TYPE |
THUMBNAIL | BINARY_TYPE |
TITLE | STRING_TYPE |
Comparison Operators
Comparison operators compare the value associated with a property name with a given Literal value. Endpoints and sources should try to use Metacard types other than the Object type. The Object type only supports backwards compatibility with java.net.URI
. Endpoints that send other Objects will not be supported by standard sources. Below is a table mapping Metacard types to supported comparison operators.
PropertyIs | Between | EqualTo | GreaterThan | GreaterThan OrEqualTo | LessThan | LessThan OrEqualTo | Like | NotEqualTo | Null |
---|---|---|---|---|---|---|---|---|---|
BINARY_TYPE | ![]() | ![]() | ![]() | ||||||
BOOLEAN_TYPE | ![]() | ![]() | ![]() | ||||||
DATE_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |
DOUBLE_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |
FLOAT_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |
GEO_TYPE | ![]() | ||||||||
INTEGER_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |
LONG_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |
OBJECT_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |
SHORT_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | |
STRING_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
XML_TYPE | ![]() | ![]() | ![]() |
Below is a table describing each comparison operator.
Operator | Description |
---|---|
PropertyIsBetween | Lower <= Property <= Upper |
PropertyIsEqualTo | Property == Literal |
PropertyIsGreaterThan | Property > Literal |
PropertyIsGreaterThanOrEqualTo | Property >= Literal |
PropertyIsLessThan | Property < Literal |
PropertyIsLessThanOrEqualTo | Property <= Literal |
PropertyIsLike | Property LIKE Literal |
PropertyIsNotEqualTo | Property != Literal |
PropertyIsNull | Property == null |
Logical Operators
Logical operators apply boolean logic to one or more child filters.
And | Not | Or | |
---|---|---|---|
Supported Filters | ![]() | ![]() | ![]() |
Temporal Operators
Temporal operators compare a date associated with a property name to a given Literal date or date range. Below is a table showing supported temporal operators.
After | AnyInteracts | Before | Begins | BegunBy | During | EndedBy | Meets | MetBy | OverlappedBy | TContains | TEquals | TOverlaps | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DATE_TYPE | ![]() | ![]() | ![]() |
Below is a table describing each temporal operator. Literal values can be either date instants or date periods.
Operator | Description |
---|---|
After | Property > (Literal || Literal.end) |
Before | Property < (Literal || Literal.start) |
During | Literal.start < Property < Literal.end |
Spatial Operators
Spatial operators compare a geometry associated with a property name to a given Literal geometry. Below is a table showing supported spatial operators.
BBox | Beyond | Contains | Crosses | Disjoint | Equals | DWithin | Intersects | Overlaps | Touches | Within | |
---|---|---|---|---|---|---|---|---|---|---|---|
GEO_TYPE | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
Below is a table describing each spatial operator. Geometries are usually represented as Well-Known Text (WKT).
Operator | Description |
---|---|
Beyond | Property geometries beyond given distance of Literal geometry |
Contains | Property geometry contains Literal geometry |
Crosses | Property geometry crosses Literal geometry |
Disjoint | Property geometry direct positions are not interior to Literal geometry |
DWithin | Property geometry lies within distance to Literal geometry |
Intersects | Property geometry intersects Literal geometry This is opposite to the Disjoint operator |
Overlaps | Property geometry interior somewhere overlaps Literal geometry interior |
Touches | Property geometry touches but does not overlap Literal geometry |
Within | Property geometry completely contains Literal geometry |