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

cql2-json between operator fails #72

Open
ka7eh opened this issue Apr 14, 2023 · 1 comment
Open

cql2-json between operator fails #72

ka7eh opened this issue Apr 14, 2023 · 1 comment

Comments

@ka7eh
Copy link
Contributor

ka7eh commented Apr 14, 2023

I see in the specs that between operator accepts 3 args: property, lower limit, and upper limit.
But pygeofilter cql2_json parser expects two args: property and a list of two values indicating the lower and upper limits.

Here's the example from OGC Specs (https://docs.ogc.org/DRAFTS/21-065.html#advanced-comparison-operators), which fails with pygeofilter:

{
  "op": "between",
  "args": [
    { "property": "depth" },
    100.0,
    150.0
  ]
}

pygeofilter expects it to be like this:

{
  "op": "between",
  "args": [
    { "property": "depth" },
    [100.0, 150.0]
  ]

Is this due to changes in specs?
It seems like a straightforward fix here: https://github.com/geopython/pygeofilter/blob/main/pygeofilter/parsers/cql2_json/parser.py#L131.
If it's an actual bug, I can submit a PR.

@captaincoordinates
Copy link
Contributor

I came here to report this exact same issue!

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