On Tue, 4 Apr 2023 at 18:40, Kajal Shrawan Katoke via Geoserver-users <
geoserver-users@lists.sourceforge.net> wrote:

> Hi Ian,
>
> Thanks for the response.
>
> I have made request using “PropertyIsEqualTo” , “PropertyIsBetween” ,
> “featureid” filters and getting expected output.
>
> *Request using PropertyIsEqualTo filter*:
>
>
> http:/localhost:8081/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=topp:states&bbox=-124.73142200000001%2C24.955967%2C-66.969849%2C49.371735&width=768&height=330&srs=EPSG%3A4326&format=application/openlayers&FILTER=%3CFilter%3E%3CPropertyIsEqualTo%3E%3CPropertyName%3Etopp:STATE_NAME%3C/PropertyName%3E%3CLiteral%3ETexas%3C/Literal%3E%3C/PropertyIsEqualTo%3E%3C/Filter%3E
>
> I have tried below request to use PropertyIsLike but it results into error.
>
>
>
> *Request using PropertyIsBetween filter*:
>
>
> http:/localhost:8081/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=topp:states&bbox=-124.73142200000001%2C24.955967%2C-66.969849%2C49.371735&width=768&height=330&srs=EPSG%3A4326&format=application/openlayers&FILTER=%3CFilter%3E%3CPropertyIsBetween%3E%3CPropertyName%3Etopp:LAND_KM%3C/PropertyName%3E%3CLowerBoundary%3E%3CLiteral%3E100000%3C/Literal%3E%3C/LowerBoundary%3E%3CUpperBoundary%3E%3CLiteral%3E150000%3C/Literal%3E%3C/UpperBoundary%3E%3C/PropertyIsBetween%3E%3C/Filter%3E
>
>
>
> *Request using featured filter:*
>
>
> http://localhost:8081/geoserver/topp/wms?service=WMS&version=1.1.0&request=GetMap&layers=topp%3Astates&bbox=-124.73142200000001%2C24.955967%2C-66.969849%2C49.371735&width=768&height=330&srs=EPSG%3A4326&styles=&format=application/openlayers&featureid=states.5
>
>
>
> In the same way I have tried below request to use “PropertyIsLike” but it
> results into error as shown in error.txt file.
>
> *Request using PropertyIsLike filter:*
>
>
> http:/localhost:8081/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=topp:states&bbox=-124.73142200000001%2C24.955967%2C-66.969849%2C49.371735&width=768&height=330&srs=EPSG%3A4326&format=application/openlayers&FILTER=%3CFilter%3E%3CPropertyIsLike%3E%3CPropertyName%3Etopp:STATE_NAME%3C/PropertyName%3E%3CLiteral%3ETexas%3C/Literal%3E%3C/PropertyIsLike%3E%3C/Filter%3E
>
> *Error on UI:*   Code=“InternalError”Rendering Process Failed
>
>
>
If you read the manual (or the filter standard) you will see:

<PropertyIsLike> matches a string property value against a text pattern. It
contains a <PropertyName> element containing the name of the property
containing the string to be matched and a <Literal> element containing the
pattern. The pattern is specified by a sequence of regular characters and
three special pattern characters. The pattern characters are defined by the
following *required* attributes of the <PropertyIsLike> element:

        wildCard specifies a pattern character which matches any sequence
of zero or more characters

        singleChar specifies a pattern character which matches any single
character

        escapeChar specifies an escape character which can be used to
escape these pattern characters

So you need to specify the 3 required attributes in the <PropertyIsLike>
tag -> <PropertyIsLike wildCard='*' singleChar='%'
escape='!'><PropertyName>...</PropertyName><Literal>*Texas*</Literal></PropertyIsLike>

Ian

> I request you to please help with the similar curl or URL request using
> PropertyIsLike and filter functions(like strEndsWith,strStartsWith).
>
>
>
> Thanks & Regards ,
>
>          Kajal
>
>
>
>
>
> *From:* Ian Turton <ijtur...@gmail.com>
> *Sent:* 04 April 2023 19:57
> *To:* Kajal Shrawan Katoke <kajal.kat...@india.nec.com>
> *Cc:* Geoserver-users@lists.sourceforge.net; Chandradeep Kumar <
> chandradeep.ku...@india.nec.com>; Madhu <mad...@india.nec.com>
> *Subject:* ##freemail## Re: [Geoserver-users] Query regarding WMS and WFS
> request
>
>
>
> Some of those are functions so you need something like `<Function
> name="strEndsWith"><Parameter name="...">....</Parameter></Function>`
>
> Others like PropertyIsLike and DWithin are used just like
> PropertyIsBetween
>
>
>
> If you are getting an error, you can check the log file to see what the
> problem is, alternatively let us know exactly what you are sending to
> GeoServer
>
>
>
>
>
> Ian
>
>
>
> On Tue, 4 Apr 2023 at 14:33, Kajal Shrawan Katoke via Geoserver-users <
> geoserver-users@lists.sourceforge.net> wrote:
>
> Hi Team,
>
>
>
> I am facing issue to use below filter in WMS and WFS(curl or http)
> request. I have setup of geoserver with postgis datastore.
>
> *List of filter:*
>
>    - PropertyIsLike
>    - strEndsWith
>    - strStartsWith
>    - jsonArrayContains
>    - DWithin
>    -
>
> I am referring document
> <https://docs.geoserver.org/2.22.x/en/user/index.html>, but didn’t find
> any solution. I have used operators like “PropertyIsBetween” , ”
> PropertyIsEqualTo” and FeatureId”. But when I use  “PropertyIsLike” not
> getting output.
>
> Now I want to know, how to use above filters in WMS and WFS request.
>
>
>
> Thanks & regards,
>
> Kajal Katoke
> ------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only. It shall not attach any liability
> on the originator or NEC Corporation India Private Limited or its
> affiliates. Any views or opinions presented in this email are solely those
> of the author and may not necessarily reflect the opinions of NEC
> Corporation India Private Limited or its affiliates. Any form of
> reproduction, dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior written
> consent of the author of this e-mail is strictly prohibited. If you have
> received this email in error please delete it and notify the sender
> immediately.
>
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>
> --
>
> Ian Turton
> ------------------------------
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only. It shall not attach any liability
> on the originator or NEC Corporation India Private Limited or its
> affiliates. Any views or opinions presented in this email are solely those
> of the author and may not necessarily reflect the opinions of NEC
> Corporation India Private Limited or its affiliates. Any form of
> reproduction, dissemination, copying, disclosure, modification,
> distribution and / or publication of this message without the prior written
> consent of the author of this e-mail is strictly prohibited. If you have
> received this email in error please delete it and notify the sender
> immediately.
> _______________________________________________
> Geoserver-users mailing list
>
> Please make sure you read the following two resources before posting to
> this list:
> - Earning your support instead of buying it, but Ian Turton:
> http://www.ianturton.com/talks/foss4g.html#/
> - The GeoServer user list posting guidelines:
> http://geoserver.org/comm/userlist-guidelines.html
>
> If you want to request a feature or an improvement, also see this:
> https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
>
>
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 
Ian Turton
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to