OGC filter "PropertyIsEqualTo" behaves more like "PropertyisLike", intended?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OGC filter "PropertyIsEqualTo" behaves more like "PropertyisLike", intended?

David I
Hello

We are running a GN 3.6.0 instance with a Postgresql 10 dbs in a Windows
server environ* and are trying to make a csw:getRecords request with a
PropertyIsEqualTo filter return only exact matches:






























*<csw:GetRecords       xmlns:csw="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2>"
xmlns:ogc="http://www.opengis.net/ogc <http://www.opengis.net/ogc>"
service="CSW"       version="2.0.2"       resultType="results"
startPosition="1"       maxRecords="15"
outputFormat="application/xml"
outputSchema="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2>"
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://www.opengis.net/cat/csw/2.0.2>
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
<http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd>"
xmlns:gmd="http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd>"
xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0
<http://www.opengis.net/cat/csw/apiso/1.0>">      <csw:Query
typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName>        <csw:Constraint
version="1.1.0">          <ogc:Filter><ogc:PropertyIsEqualTo>
  <ogc:PropertyName>title</ogc:PropertyName>
<ogc:Literal>Cykelvägar</ogc:Literal>
</ogc:PropertyIsEqualTo></ogc:Filter>        </csw:Constraint>
<ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc
<http://www.opengis.net/ogc>">                <ogc:SortProperty>
        <ogc:PropertyName>title</ogc:PropertyName>
<ogc:SortOrder>ASCE</ogc:SortOrder>                </ogc:SortProperty>
      </ogc:SortBy>      </csw:Query>    </csw:GetRecords*>

What this returns however is not only the metadata post with the exact
title "Cykelvägar" but rather every metadata post with titles matching
"*Cykelvägar*", of which there are three:
  *<csw:SearchResults numberOfRecordsMatched="3"
numberOfRecordsReturned="3" elementSet="full" nextRecord="0">*:

*<dc:title>Cykelvägar</dc:title>*
*<dc:title>Förslag cykelvägar (inkl. utgår) - ÖP 2030</dc:title>*
*<dc:title>Förslag cykelvägar - ÖP 2030</dc:title>*

As far as I'm aware PropertyIsLike allows wildcards and PropertyIsEqualTo
doesn't so it seems PropertyIsLike is supposed to return only exact
matches, is this correct?
If this is correct, how can we troubleshoot our current environment?

*The above request produces the same result on a default installation of GN
3.4 in a Linux environ (with the default h2 db)

Thanks for any replies /
David.

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: OGC filter "PropertyIsEqualTo" behaves more like "PropertyisLike", intended?

van Crombrugge, Sven (LVGL)
Hello David


I do not have a GeoNetwork 3.6 installlation ready to test it, but on 3.10 the following POST body works for me:


<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
                xmlns:gmd="http://www.isotc211.org/2005/gmd"
                service="CSW" version="2.0.2"
                resultType="results"
                outputSchema="http://www.isotc211.org/2005/gmd">
  <csw:Query typeNames="gmd:MD_Metadata">
    <csw:ElementName>
      /gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title
    </csw:ElementName>
    <csw:Constraint version="1.1.0">
      <Filter xmlns="http://www.opengis.net/ogc">
        <PropertyIsEqualTo>
          <PropertyName>any</PropertyName>
          <Literal>Cykelvägar</Literal>
        </PropertyIsEqualTo>
      </Filter>
    </csw:Constraint>
  </csw:Query>
</csw:GetRecords>


Best regards

Mit freundlichen Grüßen

Sven van Crombrugge


Sachgebiet 3.3 - Geoinformationssysteme, E-Government -

- Zentrale -


Von der Heydt 22 . 66115 Saarbrücken
Tel.: +49 (0) 681 9712-303 · Fax: +49 (0) 681 9712-200
[hidden email] · www.lvgl.saarland.de

________________________________________________________________________________________________
Hinweis zum Datenschutz
Informationen über die Verarbeitung Ihrer personenbezogenen Daten gemäß Artikel 13 und Artikel 14 der
Verordnung (EU) 2016/679 (DSGVO) sind elektronisch auf unserer Internetseite abrufbar:
https://www.saarland.de/vermessung_geoinformation_landentwicklung.htm
unter der Rubrik: Hinweise zum Datenschutz
________________________________________________________________________________________________
-----Ursprüngliche Nachricht-----
Von: David Persson <[hidden email]>
Gesendet: Donnerstag, 16. Juli 2020 10:46
An: [hidden email]
Betreff: [GeoNetwork-users] OGC filter "PropertyIsEqualTo" behaves more like "PropertyisLike", intended?

Hello

We are running a GN 3.6.0 instance with a Postgresql 10 dbs in a Windows server environ* and are trying to make a csw:getRecords request with a PropertyIsEqualTo filter return only exact matches:






























*<csw:GetRecords       xmlns:csw="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2>"
xmlns:ogc="http://www.opengis.net/ogc <http://www.opengis.net/ogc>"
service="CSW"       version="2.0.2"       resultType="results"
startPosition="1"       maxRecords="15"
outputFormat="application/xml"
outputSchema="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2>"
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://www.opengis.net/cat/csw/2.0.2>
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
<http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd>"
xmlns:gmd="http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd>"
xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0
<http://www.opengis.net/cat/csw/apiso/1.0>">      <csw:Query
typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName>        <csw:Constraint
version="1.1.0">          <ogc:Filter><ogc:PropertyIsEqualTo>
  <ogc:PropertyName>title</ogc:PropertyName>
<ogc:Literal>Cykelvägar</ogc:Literal>
</ogc:PropertyIsEqualTo></ogc:Filter>        </csw:Constraint>
<ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc
<http://www.opengis.net/ogc>">                <ogc:SortProperty>
        <ogc:PropertyName>title</ogc:PropertyName>
<ogc:SortOrder>ASCE</ogc:SortOrder>                </ogc:SortProperty>
      </ogc:SortBy>      </csw:Query>    </csw:GetRecords*>

What this returns however is not only the metadata post with the exact title "Cykelvägar" but rather every metadata post with titles matching "*Cykelvägar*", of which there are three:
  *<csw:SearchResults numberOfRecordsMatched="3"
numberOfRecordsReturned="3" elementSet="full" nextRecord="0">*:

*<dc:title>Cykelvägar</dc:title>*
*<dc:title>Förslag cykelvägar (inkl. utgår) - ÖP 2030</dc:title>* *<dc:title>Förslag cykelvägar - ÖP 2030</dc:title>*

As far as I'm aware PropertyIsLike allows wildcards and PropertyIsEqualTo doesn't so it seems PropertyIsLike is supposed to return only exact matches, is this correct?
If this is correct, how can we troubleshoot our current environment?

*The above request produces the same result on a default installation of GN
3.4 in a Linux environ (with the default h2 db)

Thanks for any replies /
David.

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: OGC filter "PropertyIsEqualTo" behaves more like "PropertyisLike", intended?

David I
Hi,

Thanks a lot! That made a difference!
Regards,
David.

On Thu, Jul 16, 2020 at 11:28 AM van Crombrugge, Sven (LVGL) <
[hidden email]> wrote:

> Hello David
>
>
> I do not have a GeoNetwork 3.6 installlation ready to test it, but on 3.10
> the following POST body works for me:
>
>
> <?xml version="1.0"?>
> <csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"
>                 xmlns:gmd="http://www.isotc211.org/2005/gmd"
>                 service="CSW" version="2.0.2"
>                 resultType="results"
>                 outputSchema="http://www.isotc211.org/2005/gmd">
>   <csw:Query typeNames="gmd:MD_Metadata">
>     <csw:ElementName>
>
> /gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title
>     </csw:ElementName>
>     <csw:Constraint version="1.1.0">
>       <Filter xmlns="http://www.opengis.net/ogc">
>         <PropertyIsEqualTo>
>           <PropertyName>any</PropertyName>
>           <Literal>Cykelvägar</Literal>
>         </PropertyIsEqualTo>
>       </Filter>
>     </csw:Constraint>
>   </csw:Query>
> </csw:GetRecords>
>
>
> Best regards
>
> Mit freundlichen Grüßen
>
> Sven van Crombrugge
>
>
> Sachgebiet 3.3 - Geoinformationssysteme, E-Government -
>
> - Zentrale -
>
>
> Von der Heydt 22 . 66115 Saarbrücken
> Tel.: +49 (0) 681 9712-303 · Fax: +49 (0) 681 9712-200
> [hidden email] · www.lvgl.saarland.de
>
>
> ________________________________________________________________________________________________
> Hinweis zum Datenschutz
> Informationen über die Verarbeitung Ihrer personenbezogenen Daten gemäß
> Artikel 13 und Artikel 14 der
> Verordnung (EU) 2016/679 (DSGVO) sind elektronisch auf unserer
> Internetseite abrufbar:
> https://www.saarland.de/vermessung_geoinformation_landentwicklung.htm
> unter der Rubrik: Hinweise zum Datenschutz
>
> ________________________________________________________________________________________________
> -----Ursprüngliche Nachricht-----
> Von: David Persson <[hidden email]>
> Gesendet: Donnerstag, 16. Juli 2020 10:46
> An: [hidden email]
> Betreff: [GeoNetwork-users] OGC filter "PropertyIsEqualTo" behaves more
> like "PropertyisLike", intended?
>
> Hello
>
> We are running a GN 3.6.0 instance with a Postgresql 10 dbs in a Windows
> server environ* and are trying to make a csw:getRecords request with a
> PropertyIsEqualTo filter return only exact matches:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *<csw:GetRecords       xmlns:csw="http://www.opengis.net/cat/csw/2.0.2
> <http://www.opengis.net/cat/csw/2.0.2>"
> xmlns:ogc="http://www.opengis.net/ogc <http://www.opengis.net/ogc>"
> service="CSW"       version="2.0.2"       resultType="results"
> startPosition="1"       maxRecords="15"
> outputFormat="application/xml"
> outputSchema="http://www.opengis.net/cat/csw/2.0.2
> <http://www.opengis.net/cat/csw/2.0.2>"
> 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://www.opengis.net/cat/csw/2.0.2>
> http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
> <http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd>"
> xmlns:gmd="http://www.isotc211.org/2005/gmd
> <http://www.isotc211.org/2005/gmd>"
> xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0
> <http://www.opengis.net/cat/csw/apiso/1.0>">      <csw:Query
> typeNames="csw:Record">
> <csw:ElementSetName>full</csw:ElementSetName>        <csw:Constraint
> version="1.1.0">          <ogc:Filter><ogc:PropertyIsEqualTo>
>   <ogc:PropertyName>title</ogc:PropertyName>
> <ogc:Literal>Cykelvägar</ogc:Literal>
> </ogc:PropertyIsEqualTo></ogc:Filter>        </csw:Constraint>
> <ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc
> <http://www.opengis.net/ogc>">                <ogc:SortProperty>
>         <ogc:PropertyName>title</ogc:PropertyName>
> <ogc:SortOrder>ASCE</ogc:SortOrder>                </ogc:SortProperty>
>       </ogc:SortBy>      </csw:Query>    </csw:GetRecords*>
>
> What this returns however is not only the metadata post with the exact
> title "Cykelvägar" but rather every metadata post with titles matching
> "*Cykelvägar*", of which there are three:
>   *<csw:SearchResults numberOfRecordsMatched="3"
> numberOfRecordsReturned="3" elementSet="full" nextRecord="0">*:
>
> *<dc:title>Cykelvägar</dc:title>*
> *<dc:title>Förslag cykelvägar (inkl. utgår) - ÖP 2030</dc:title>*
> *<dc:title>Förslag cykelvägar - ÖP 2030</dc:title>*
>
> As far as I'm aware PropertyIsLike allows wildcards and PropertyIsEqualTo
> doesn't so it seems PropertyIsLike is supposed to return only exact
> matches, is this correct?
> If this is correct, how can we troubleshoot our current environment?
>
> *The above request produces the same result on a default installation of GN
> 3.4 in a Linux environ (with the default h2 db)
>
> Thanks for any replies /
> David.
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork