Uploaded image for project: 'GeoTools'
  1. GEOT-5343

Support matchCase on PropertyIsLike in Filter 2.0


    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 16.4, 17.1, 18-beta
    • Fix Version/s: 16.5, 17.2, 18-beta
    • Component/s: xsd extensions
    • Labels:


      Waiting on OGC to update Filter 2.0 schemas to add matchCase on PropertyIsLike as was done in the Filter 1.1.3 schemas:

      -------- Forwarded Message --------
      Subject: Re: [Geoserver-users] Exception with Filter 2.0 and matchCase="false" on PropertyIsLike
      Date: Sat, 23 Jan 2016 16:14:11 +1300
      From: Ben Caradoc-Davies
      To: Nhan Vo
      CC: geoserver-users@lists.sourceforge.net

      Nhan Vo,

      I have contacted the chair of the OGC WFS/FES standard technical
      committee, who has confirmed that the lack of matchCase on
      PropertyIsLike in the Filter 2.0.2 schemas and standard is a known
      issue. He is following up with OGC.

      When the Filter 2.0 schemas are updated to include matchCase on
      PropertyIsLike, we just need to apply this change to the schemas in
      gt-xsd-fes and GeoServer will start permitting matchCase on PropertyIsLike.

      We should also add test coverage for matchCase to gs-wfs
      Filter_2_0_0_KvpParserTest, once this new test is merged and matchCase
      is in the Filter 2.0 schemas. Test coverage will prevent any future

      Kind regards,

      On 22/01/16 01:23, Ben Caradoc-Davies wrote:
      > I looked a little deeper and matchCase="false" should be supported on
      > PropertyIsLike in GeoServer WFS 1.1 because Niels kindly updated
      > GeoTools to use the FES 1.1.3 schemas back in 2013 to add matchCase support:
      > http://osgeo-org.1560.x6.nabble.com/ogc-filter-1-1-doesn-t-support-matchCase-in-PropertyIsLike-td5079577.html
      > https://github.com/geotools/geotools/commit/4855cba310362f488d5686eda1fff17d7d02c714
      > http://schemas.opengis.net/filter/1.1.0/filter.xsd
      > I changed the GET request to use WFS 1.1 and can confirm that
      > matchCase="false" works. The request matches "illino*" to "Illinois":
      > http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=topp:states&filter=%3Cogc:Filter%20xmlns:ogc=%22http://www.opengis.net/ogc%22%3E%3Cogc:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cogc:PropertyName%3Etopp:STATE_NAME%3C/ogc:PropertyName%3E%3Cogc:Literal%3Eillino*%3C/ogc:Literal%3E%3C/ogc:PropertyIsLike%3E%3C/ogc:Filter%3E
      > But if I look at even the latest schemas and standard for FES 2.0.2,
      > there is no matchCase on PropertyIsLike:
      > http://schemas.opengis.net/filter/2.0/filter.xsd
      > http://docs.opengeospatial.org/is/09-026r2/09-026r2.html
      > I think this is a bug in the FES 2.0.2 schemas. I think GeoServer will
      > need updated schemas to fix this for WFS 2.0 (and we can see that the
      > XML parsing is horribly broken without this fix). We may need a change
      > request (or an email to the standard maintainer):
      > http://www.opengeospatial.org/standards/cr
      > If I add a single line to the definition of PropertyIsLikeType in the
      > copy of the FES 2.0 schemas in GeoTools gt-xsd-fes:
      > modules/extension/xsd/xsd-fes/src/main/resources/org/geotools/filter/v2_0/filter.xsd
      > <xsd:attribute name="matchCase" type="xsd:boolean" use="optional"
      > default="true"/>
      > then suddenly matchCase="false" on PropertyIsLike starts working for WFS
      > 2.0 in GeoServer, just as as for WFS 1.1:
      > http://localhost:8080/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=topp:states&filter=%3Cfes:Filter%20xmlns:fes=%22http://www.opengis.net/fes/2.0%22%3E%3Cfes:PropertyIsLike%20matchCase=%22false%22%20wildCard=%22*%22%20singleChar=%22%23%22%20escapeChar=%22!%22%3E%3Cfes:ValueReference%3Etopp:STATE_NAME%3C/fes:ValueReference%3E%3Cfes:Literal%3Eillino*%3C/fes:Literal%3E%3C/fes:PropertyIsLike%3E%3C/fes:Filter%3E

      Ben Caradoc-Davies <ben@transient.nz>
      Transient Software Limited <http://transient.nz/>
      New Zealand


          Issue links



              • Assignee:
                bencaradocdavies Ben Caradoc-Davies
                bencaradocdavies Ben Caradoc-Davies
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: