WFS Request FES 2.0 Filter not working

Description

I think I discovered a bug in the wfs implementation of geotools.

 

I want to get a feature from a wfs server with wfs 2.0 (Web Feature Service 2.0. (ISO 19142)) and fes 2.0 (Filter Encoding Standard (FES) 2.0 (ISO 19143)). But geotools looks in the fes 2.0 conform capabilities (PropertyIsEqualTo) for a ogc filtername (EqualTo). So geotools thinks, the server does not support the requested filter.

The question is, is it already possible to use wfs 2.0 with fes 2.0 in geotools? Or is a special configuration needed, which I forgot?

 

Here is a code example:

1 2 3 final ContentFeatureSource source = … final Filter filter = CQL.toFilter("ags = '09162000'", null); final FeatureReader<SimpleFeatureType, SimpleFeature> features = source.getReader(filter);

Geotools thinks, this filter is not supported from the wfs server. So geotools just grabs all the features from the Server And than makes the filtering itself. This is the problem, because the Server should to do the filtering itself.

 

The details of the problematic code:

The created filter from the statement above is org.geotools.filter.IsEqualsToImpl.

The code which desides if the filter is supported or unsupported is in class org.geotools.data.wfs.internal.v2_0.StrictWFS_2_0_Strategy in method createGetFeatureRequestPost.

The splitting between supported filters and unsupported filters is made in class org.geotools.filter.visitor.CapabilitiesFilterSplitter in method visitBinaryOperator.

The comparising happens in class org.geotools.filter.visitor.IsSupportedFilterVisitor:

1 2 3 4 5 6 7 8 9 public Object visit( PropertyIsEqualTo filter, Object extraData ) { ScalarCapabilities scalar = capabilities.getScalarCapabilities(); if( scalar == null ) return false; ComparisonOperators operators = scalar.getComparisonOperators(); if( operators == null ) return false; return operators.getOperator( PropertyIsEqualTo.NAME ) != null; }

 

So for the comparing the code uses the ogc filtername EqualTo and the filternames in the capabilities from fes 2.0 (PropertyIsEqualTo). Obviously the filtername is not found in the capabilities.

Environment

None

Status

Assignee

Unassigned

Reporter

Matthias Schulze

Triage

None

Components

Priority

Medium
Configure