[gdal-dev] A CSW query that seems to me works badly

andy aborruso at gmail.com
Tue Nov 15 14:47:41 PST 2022


Ho Evan,
how can I get that log?

If I remove "-al" I have 0 results.
But I do not understand why

Il mar 15 nov 2022, 23:21 Even Rouault <even.rouault at spatialys.com> ha
scritto:

> Andrea,
>
> It seems to me that the server ignores the filter, which is likely a bug
> given that its GetCapabilies response includes a
> <ogc:ComparisonOperator>Like</ogc:ComparisonOperator>.
>
> Looking at GDAL logs, it emits a request equivalent to
>
> $ curl -X POST -H "Content-Type: application/xml; charset=UTF-8" -d '<?xml
> version="1.0" encoding="UTF-8"?><csw:GetRecords resultType="hits"
> service="CSW" version="2.0.2" xmlns:csw=
> "http://www.opengis.net/cat/csw/2.0.2"
> <http://www.opengis.net/cat/csw/2.0.2> xmlns:gml=
> "http://www.opengis.net/gml" <http://www.opengis.net/gml> xmlns:dc=
> "http://purl.org/dc/elements/1.1/" <http://purl.org/dc/elements/1.1/>
> xmlns:dct="http://purl.org/dc/terms/" <http://purl.org/dc/terms/>
> xmlns:ogc="http://www.opengis.net/ogc" <http://www.opengis.net/ogc>
> xmlns:ows="http://www.opengis.net/ows" <http://www.opengis.net/ows>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> <http://www.w3.org/2001/XMLSchema-instance> xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2
> http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd"
> <http://www.opengis.net/cat/csw/2.0.2http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd>><csw:Query
> typeNames="csw:Record"><csw:ElementSetName>full</csw:ElementSetName><csw:Constraint
> version="1.1.0"><ogc:Filter><ogc:PropertyIsLike wildCard="*" singleChar="_"
> escapeChar="X"
> matchCase="true"><ogc:PropertyName>dc:subject</ogc:PropertyName><ogc:Literal>Impianti
> e strutture
> ricettive</ogc:Literal></ogc:PropertyIsLike></ogc:Filter></csw:Constraint></csw:Query></csw:GetRecords>'
> https://geodati.gov.it/RNDT/csw
>
> which includes the filter specified in -where, but the server answers:
>
> <?xml version="1.0" encoding="UTF-8"?><csw:GetRecordsResponse xmlns:csw=
> "http://www.opengis.net/cat/csw/2.0.2"
> <http://www.opengis.net/cat/csw/2.0.2> xmlns:dc=
> "http://purl.org/dc/elements/1.1/" <http://purl.org/dc/elements/1.1/>
> xmlns:dcmiBox="http://dublincore.org/documents/2000/07/11/dcmi-box/"
> <http://dublincore.org/documents/2000/07/11/dcmi-box/> xmlns:dct=
> "http://purl.org/dc/terms/" <http://purl.org/dc/terms/> xmlns:gml=
> "http://www.opengis.net/gml" <http://www.opengis.net/gml> xmlns:ows=
> "http://www.opengis.net/ows" <http://www.opengis.net/ows> xmlns:xsd=
> "http://www.w3.org/2001/XMLSchema" <http://www.w3.org/2001/XMLSchema>>
> <csw:SearchStatus timestamp="2022-11-15T23:19:01+01:00"/>
> <csw:SearchResults elementSet="full" nextRecord="1"
> numberOfRecordsMatched="22" numberOfRecordsReturned="0" recordSchema=
> "http://www.opengis.net/cat/csw/2.0.2"
> <http://www.opengis.net/cat/csw/2.0.2>/>
>
> Even
> Le 15/11/2022 à 23:00, andy a écrit :
>
> Hi,
> if I run
>
> ogrinfo -ro -al "CSW:http://geodati.gov.it/RNDT/csw" -where "subject LIKE
> 'Impianti e strutture ricettive'"
>
> I have 22 items in the result. But no one of those have in the subject the
> string "'Impianti e strutture ricettive".
> Why don't I have zero results?
>
> Thank you
>
> --
>
>
> Andrea Borruso
>
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221115/3c44f2df/attachment-0001.htm>


More information about the gdal-dev mailing list