[Geoserver-users] WFS PropertyIsLessThanEqualTo filter not working?

Maybe I'm just doing something wrong, but GeoServer 1.6.5 no longer seems to
handle "LessThanEqualTo" filters in WFS.

If I submit the following request, GeoServer generates the correct filter
i.e. "filter: [ topp:LAND_KM < 10000 ]", and I get the expected results i.e.
3 states returned (DC, Delaware, Rhode Island):

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:topp="http://www.openplans.org/topp&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="topp:states">
  <ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
  <ogc:PropertyName>topp:LAND_KM</ogc:PropertyName>
<ogc:Filter>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>topp:LAND_KM</ogc:PropertyName>
<ogc:Literal>10000</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

But if I submit the equivalent request with a "LessThanEqualTo" filter,
GeoServer ignores it i.e. it does not generate the filter clause, so I get a
list of all the statues returned.

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:topp="http://www.openplans.org/topp&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="topp:states">
  <ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
  <ogc:PropertyName>topp:LAND_KM</ogc:PropertyName>
<ogc:Filter>
<ogc:PropertyIsLessThanEqualTo>
<ogc:PropertyName>topp:LAND_KM</ogc:PropertyName>
<ogc:Literal>10000</ogc:Literal>
</ogc:PropertyIsLessThanEqualTo>
</ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

I'm sure this used to work in GeoServer 1.6.3, and I haven't changed the
code that generates my WFS requests since moving to 1.6.5, so what's my
problem here?

Thanks for any help you can offer!

Chris

--
View this message in context: http://www.nabble.com/WFS-PropertyIsLessThanEqualTo-filter-not-working--tp19796569p19796569.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Sorry - it doesn't work in 1.6.3 either. So what am I doing wrong with these
filters?
--
View this message in context: http://www.nabble.com/WFS-PropertyIsLessThanEqualTo-filter-not-working--tp19796569p19796696.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi,

Does filter PropertyIsLessThanEqualTo exist? My menu driven WFS client does include PropertyIsLessThanOrEqualTo filter, but not PropertyIsLessThanEqualTo.

-Jukka Rahkonen-

-----Alkuperäinen viesti-----
Lähettäjä: ChrisWebster [mailto:cwebster@anonymised.com]
Lähetetty: 3. lokakuuta 2008 15:12
Vastaanottaja: geoserver-users@lists.sourceforge.net
Aihe: [Geoserver-users] WFS PropertyIsLessThanEqualTo filter
not working?

Maybe I'm just doing something wrong, but GeoServer 1.6.5 no
longer seems to handle "LessThanEqualTo" filters in WFS.

If I submit the following request, GeoServer generates the
correct filter i.e. "filter: [ topp:LAND_KM < 10000 ]", and I
get the expected results i.e.
3 states returned (DC, Delaware, Rhode Island):

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:topp="http://www.openplans.org/topp&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="topp:states">
  <ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
  <ogc:PropertyName>topp:LAND_KM</ogc:PropertyName>
<ogc:Filter>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>topp:LAND_KM</ogc:PropertyName>
<ogc:Literal>10000</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

But if I submit the equivalent request with a
"LessThanEqualTo" filter, GeoServer ignores it i.e. it does
not generate the filter clause, so I get a list of all the
statues returned.

<wfs:GetFeature service="WFS" version="1.0.0"
  outputFormat="GML2"
  xmlns:topp="http://www.openplans.org/topp&quot;
  xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:ogc="http://www.opengis.net/ogc&quot;
  xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/wfs
                      
http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
  <wfs:Query typeName="topp:states">
  <ogc:PropertyName>topp:STATE_NAME</ogc:PropertyName>
  <ogc:PropertyName>topp:LAND_KM</ogc:PropertyName>
<ogc:Filter>
<ogc:PropertyIsLessThanEqualTo>
<ogc:PropertyName>topp:LAND_KM</ogc:PropertyName>
<ogc:Literal>10000</ogc:Literal>
</ogc:PropertyIsLessThanEqualTo>
</ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

I'm sure this used to work in GeoServer 1.6.3, and I haven't
changed the code that generates my WFS requests since moving
to 1.6.5, so what's my problem here?

Thanks for any help you can offer!

Chris

--
View this message in context:
http://www.nabble.com/WFS-PropertyIsLessThanEqualTo-filter-not
-working--tp19796569p19796569.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

--------------------------------------------------------------
-----------
This SF.Net email is sponsored by the Moblin Your Move
Developer's challenge
Build the coolest Linux based applications with Moblin SDK &
win great prizes
Grand prize is a trip for two to an Open Source event
anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

OK, sorry everybody, it was just a short-circuit between the ears.

The correct filter name is (of course) "PropertyIsLessThanOrEqualTo", even
thought WFS GetCapabilities reports the filter operator as
"<ogc:ComparisonOperator>LessThanEqualTo</ogc:ComparisonOperator>".

That'll teach me to assume the OGC standards are internally consistent, eh?

Chris
--
View this message in context: http://www.nabble.com/WFS-PropertyIsLessThanEqualTo-filter-not-working--tp19796569p19796785.html
Sent from the GeoServer - User mailing list archive at Nabble.com.