[mapserver-users] TinyOWS and the logical operators
Andrea Peri
aperi2007 at gmail.com
Sun Oct 14 03:04:39 PDT 2012
mmh...
Hi,
'm try-ing to check the logical operator but they don't seem work.
If the AND operator is supported this mean that I'm wrong something.
This request will get the results from a query with filter NAME="FIRENZE".
http://web.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=infrastrutture:rt_infr_idstrade_rt_bb&propertyName=geometry,dug,toponimo,den_estesa,tipo_prop,cod_istat,comune&sortBy=dug+A,toponimo+A&Filter=%3CFilter%20xmlns:wfs=%22http://www.opengis.net/wfs%22%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Ecomune%3C/PropertyName%3E%3CLiteral%3EFIRENZE%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E
And the logs report correctly the filter used:
[Sun Oct 14 11:51:50 2012] [SQL] SELECT ST_xmin(g.extent),
ST_ymin(g.extent), ST_xmax(g.extent), ST_ymax(g.extent) FROM (SELECT
ST_Extent(foo.the_geom) as extent FROM ( (SELECT
ST_Transform("geometry"::geometry, 3003) AS "the_geom" FROM
iternet."itnt_stradebb" WHERE "comune" = 'FIRENZE' ORDER BY "dug"
ASC,"toponimo" ASC LIMIT 500) ) AS foo) AS g
Now I try to call the same request with a double filter:
NAME="FIRENZE" AND TIPO_PROP="Comune"
I build it following a sample from mapserver docs.
http://web.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=infrastrutture:rt_infr_idstrade_rt_bb&propertyName=geometry,dug,toponimo,den_estesa,tipo_prop,cod_istat,comune&sortBy=dug+A,toponimo+A&Filter=<Filter
xmlns:wfs="http://www.opengis.net/wfs
"><AND><PropertyIsEqualTo><PropertyName>comune</PropertyName><Literal>FIRENZE</Literal></PropertyIsEqualTo><PropertyIsEqualTo><PropertyName>tipo_prop</PropertyName><Literal>Comune</Literal></PropertyIsEqualTo></AND></Filter>
But this request don't return any results.
Seeing the log it report that the query has the "where" filter empty:
[Sun Oct 14 11:55:38 2012] [SQL] SELECT "ogc_fid",ST_AsGML(3,
ST_Transform("geometry"::geometry,3003),8, 23) AS "geometry"
,"col_0","cod_top","comune","siglaprov","cod_com","cod_istat","dug","toponimo","cod_reg","den_estesa","tip_prp","tipo_prop","cod_prp","cls_amm","den_breve","data_elab"
FROM iternet."itnt_stradebb" WHERE ORDER BY "dug" ASC,"toponimo" ASC LIMIT
500
so nothing is find.
If the AND operator is supported from TinyOWS, this mean that I'm wrong
something else.
Any hint is welcome
Thx,
Andrea.
2012/10/14 Olivier Courtin <olivier.courtin at gmail.com>
> On Sun, Oct 14, 2012 at 1:46 AM, Andrea Peri <aperi2007 at gmail.com> wrote:
>
> Hi Andrea,
>
> reading the getcapabilities, I see the TinyOWS has not any LogicalOperator
>> capability like AND , OR, etc..
>> Is this correct for wfs 1.1.0 or is a lack of feature ?
>>
>
> LogicalOperators are supported in TinyOWS,
> and it appears it the capabilities as LogicalOperators tags.
>
> Indeed you're right there's no detail on what is exactly supported at
> capabilities level (indeed it means 'all'),
> but it's related to OGC Filter XSD itself:
>
> see schema/filter/1.1.0/filterCapabilities.xsd
>
>
> Thanks for asking,
>
> --
> Olivier
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20121014/553a964d/attachment.htm>
More information about the MapServer-users
mailing list