/
DDF Filter Profile

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 AttributeMetacard Type
ANY_DATEDATE_TYPE
ANY_GEOGEO_TYPE
ANY_TEXTSTRING_TYPE
CONTENT_TYPESTRING_TYPE
CONTENT_TYPE_VERSIONSTRING_TYPE
CREATEDDATE_TYPE
EFFECTIVEDATE_TYPE
GEOGRAPHYGEO_TYPE
IDSTRING_TYPE
METADATAXML_TYPE
MODIFIEDDATE_TYPE
RESOURCE_SIZESTRING_TYPE
RESOURCE_URISTRING_TYPE
SOURCE_IDSTRING_TYPE
TARGET_NAMESPACESTRING_TYPE
THUMBNAILBINARY_TYPE
TITLESTRING_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.

PropertyIsBetweenEqualToGreaterThanGreaterThan
OrEqualTo
LessThanLessThan
OrEqualTo
LikeNotEqualToNull
BINARY_TYPE (tick)     (tick)(tick)
BOOLEAN_TYPE (tick)     (tick)(tick)
DATE_TYPE(tick)(tick)(tick)(tick)(tick)(tick) (tick)(tick)
DOUBLE_TYPE(tick)(tick)(tick)(tick)(tick)(tick) (tick)(tick)
FLOAT_TYPE(tick)(tick)(tick)(tick)(tick)(tick) (tick)(tick)
GEO_TYPE        (tick)
INTEGER_TYPE(tick)(tick)(tick)(tick)(tick)(tick) (tick)(tick)
LONG_TYPE(tick)(tick)(tick)(tick)(tick)(tick) (tick)(tick)
OBJECT_TYPE(tick)(tick)(tick)(tick)(tick)(tick) (tick)(tick)
SHORT_TYPE(tick)(tick)(tick)(tick)(tick)(tick) (tick)(tick)
STRING_TYPE(tick)(tick)(tick)(tick)(tick)(tick)(tick)(tick)(tick)
XML_TYPE (tick)    (tick) (tick)

Below is a table describing each comparison operator.

OperatorDescription
PropertyIsBetweenLower <= Property <= Upper
PropertyIsEqualToProperty == Literal
PropertyIsGreaterThanProperty > Literal
PropertyIsGreaterThanOrEqualToProperty >= Literal
PropertyIsLessThanProperty < Literal
PropertyIsLessThanOrEqualToProperty <= Literal
PropertyIsLike

Property LIKE Literal
Equivalent to SQL "like" 

PropertyIsNotEqualToProperty != Literal
PropertyIsNullProperty == null

 


Logical Operators

Logical operators apply boolean logic to one or more child filters.

 AndNotOr
Supported Filters(tick)(tick)(tick)

 


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.

 AfterAnyInteractsBeforeBeginsBegunByDuringEndedByMeetsMetByOverlappedByTContainsTEqualsTOverlaps
DATE_TYPE(tick) (tick)  (tick)       

Below is a table describing each temporal operator. Literal values can be either date instants or date periods.

OperatorDescription
AfterProperty > (Literal || Literal.end)
BeforeProperty < (Literal || Literal.start)
DuringLiteral.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.

 BBoxBeyondContainsCrossesDisjointEqualsDWithinIntersectsOverlapsTouchesWithin
GEO_TYPE (tick)(tick)(tick)(tick) (tick)(tick)(tick)(tick)(tick)

Below is a table describing each spatial operator.  Geometries are usually represented as Well-Known Text (WKT).

OperatorDescription
BeyondProperty geometries beyond given distance of Literal geometry
ContainsProperty geometry contains Literal geometry
CrossesProperty geometry crosses Literal geometry
DisjointProperty geometry direct positions are not interior to Literal geometry
DWithinProperty geometry lies within distance to Literal geometry
IntersectsProperty geometry intersects Literal geometry
This is opposite to the Disjoint operator 
OverlapsProperty geometry interior somewhere overlaps Literal geometry interior
TouchesProperty geometry touches but does not overlap Literal geometry
WithinProperty geometry completely contains Literal geometry