Opened 13 years ago
Last modified 12 years ago
#4055 new defect
WFS GetFeatures with OGC Filters not working with Custom OutputFormats
Reported by: | chodgson | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | 6.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
Some OGC filters cause empty result sets to be returned when used in combination with maxfeatures and using a custom output format.
Here is an example URL:
http://localhost/cgi-bin/ms6/mapserv.exe ?map=h:\mapfiles\test\test.map &service=WFS &version=1.0.0 &request=GetFeature &TypeName=holypoly &SRS=EPSG:4326 &MAXFEATURES=200 &OUTPUTFORMAT=foo &FILTER=<ogc:Filter xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyIsBetween><ogc:PropertyName>NAME</ogc:PropertyName><ogc:LowerBoundary><ogc:Literal>b</ogc:Literal></ogc:LowerBoundary><ogc:UpperBoundary><ogc:Literal>d</ogc:Literal></ogc:UpperBoundary></ogc:PropertyIsBetween></ogc:Filter>
This URL returns an empty set of data using my custom outputformat "foo" (which is a custom KML format). If I remove the "MaxFeatures" parameter, it returns the correct result, or alternatively if I do not specify an outputformat, it returns me the correct results in the default GML format.
Filter operators which I have to tested that fail in this case (return empty results when there are known results matching the filter):
<And> <Or> <propertyIsBetween> <PropertyIsEqualTo>
However these others work correctly:
<PropertyIsLessThan> <PropertyIsGreaterThan>
While removing the maxfeatures is a potential workaround, this is not ideal as the maxfeatures parameter is handy to prevent overloading the server.
Change History (3)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Component: | WFS Server → MapServer C Library |
---|---|
Owner: | changed from | to
Version: | unspecified → 6.0 |
FYI, I tested the patch for #4011 and it had no effect on this issue.
Note that my the custom outputformat "foo" is a template-driven outputformat, defined like this in the mapfile: