Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cql-json LIKE predicate tested against incorrect format #20

Open
rsmith013 opened this issue Jul 9, 2021 · 2 comments
Open

cql-json LIKE predicate tested against incorrect format #20

rsmith013 opened this issue Jul 9, 2021 · 2 comments

Comments

@rsmith013
Copy link

rsmith013 commented Jul 9, 2021

The cql-json LIKE format is:

{
  "like": [
    { "property": "name" },
    "Smith."
  ],
  "singleChar": ".",
  "nocase": true
}

https://portal.ogc.org/files/96288#req_simple-cql_like-predicate

rsmith013 pushed a commit to rsmith013/pygeofilter that referenced this issue Jul 9, 2021
rsmith013 pushed a commit to rsmith013/pygeofilter that referenced this issue Jul 9, 2021
@constantinius
Copy link
Contributor

Hi @rsmith013

Thanks for submitting this issue. In my opinion this boils down to the spec having been vague and inconsistent in that specific part.
For all other predicates and other nodes, it is immediately obvious which type of node this represents as it only has a single property defining its type, and using the value to pass parameters. For like this is unfortunately not the case, as the options of the node are on the same level as the node type.

For that reason I submitted an issue for the CQL JSON Spec (opengeospatial/ogcapi-features#555).

This again has been surpassed by the developments in the spec, making the like node much simpler (opengeospatial/ogcapi-features#592). A like node would look like this:

{ "like": [ {"property": "name"}, "smith." ] }

This is not yet officially released though, and I'm not yet sure when this will be. To be honest, I'm not sure what the best course of action is in this regard. I'll try to find out when the next iteration of the spec will land, so that we can maybe switch to it.

@rsmith013
Copy link
Author

ok, it would be good to know. I am new to CQL but the example I found didn't work with the implementation in pygeofilter.
I am writing an elasticsearch backend to this (will make a PR once it is more complete) and just picking the predicates off one by one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants