Skip to content

cql2-json between operator fails #72

Description

@ka7eh

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions