Opened 13 years ago

Last modified 13 years ago

#3892 new enhancement

OGC filter with BinaryLogicOpType - should throw warning when using one

Reported by: adube Owned by: mapserverbugs
Priority: normal Milestone:
Component: WFS Client Version: 6.0
Severity: normal Keywords: filter BinaryLogicOpType
Cc: aboudreault, assefa

Description

Filter fact

In the filter xsd schema, it states that a BinaryLogicOpType must occurs at least 2 times to be valid. Here's the portion stating this (see minOccurs) :

<xsd:complexType name="BinaryLogicOpType">
 <xsd:complexContent>
  <xsd:extension base="ogc:LogicOpsType">
   <xsd:choice minOccurs="2" maxOccurs="unbounded">
    <xsd:element ref="ogc:comparisonOps"/>
    <xsd:element ref="ogc:spatialOps"/>
    <xsd:element ref="ogc:logicOps"/>
   </xsd:choice>
  </xsd:extension>
 </xsd:complexContent>
</xsd:complexType>

The issue I encountered

Not knowing that, I created my own filter using OpenLayers with an "OR" expression containing only one "Insersects" expression. With it, MapServer returned all features, which was not expected at all. While trying to figure out what was happening, I tried to use the "Intersects" expression only and it behaved correctly. I also tried to use the "OR" expression with the same "Intersects" expression two times in it and it also worked.

My wish list

I think MapServer shouldn't return all features when a filter is not valid. Instead, it should return a warning of some sort (in GML probably) complaining about the filter being invalid.

Conclusion

In the end, I'll be able to solve this issue in my application by checking how many "Insersect" filters I have before creating an extra "OR" one if I have more than one, so the issue is not critical.

Please, let me know if you need to have GetFeature XML examples with invalid filters.

Change History (2)

comment:1 by aboudreault, 13 years ago

Cc: aboudreault added
Component: MapServer C LibraryWFS Client
Owner: changed from sdlime to mapserverbugs

comment:2 by aboudreault, 13 years ago

Cc: assefa added
Note: See TracTickets for help on using tickets.