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

Filtered OGC API Features layers #266

Open
jampukka opened this issue Jan 28, 2022 · 3 comments
Open

Filtered OGC API Features layers #266

jampukka opened this issue Jan 28, 2022 · 3 comments

Comments

@jampukka
Copy link
Member

jampukka commented Jan 28, 2022

Support for Filtered WFS-layers was added in #228, however the support wasn't added to OGC API Features layers. Currently a filter configured as documented here https://oskari.org/documentation/examples/oskari-filter is just silently ignored if the layer in question is of type WFS3/OGC API Features.

OGC API Features - Part 3: Filtering (& CQL2) isn't finished so supporting all features designed in #228 can't be done fully server-side. But even after it gets finished most services won't support all conformance classes inside Part 3: Filtering. These conformance classes determine which sort of filtering capabilities the service does support. We need to be able to determine which ones the server does support and send them as part of the request. The ones that aren't supported by that specific service should be post-filtered in Oskari server.

It would make sense to add support for simple query parameters as defined inPart 1: Core. This would allow combining equal to, in (arguable, but many support /items?foo=1,2,3,4 as 'foo' IN (1,2,3,4), and bbox filters in a simple (non-nested) AND which in total most probably covers large portion of use-cases for this whole functionality.

@jampukka
Copy link
Member Author

jampukka commented Mar 18, 2022

Working on this issue on oskariorg/oskari-server#816

Current progress using tieviiva (road links) from https://avoin-paikkatieto.maanmittauslaitos.fi/maastotiedot/features/v1/collections/tieviiva which supports filtering only on kohdeluokka (category)

CQL Filter "kohdeluokka" IN (12111, 12112), Layer Attributes configured as:


{
  "filter": {
    "property": {
      "in": ["12111","12112"],
      "key": "kohdeluokka"
    }
  }
}

image


CQL Filter "kohdeluokka" IN (12111, 12112) AND nimi_suomi = 'Länsiväylä', Layer Attributes configured as:

{
  "filter": {
    "AND": [
      {
        "in": ["12111","12112"],
        "key": "kohdeluokka"
      },
      {
        "value": "Länsiväylä",
        "key": "nimi_suomi"
      }
    ]
  },
  "queryables": [
    "kohdeluokka"
  ]
}

image

Generated OAPIF query is https://avoin-paikkatieto.maanmittauslaitos.fi/maastotiedot/features/v1/collections/tieviiva/items?limit=1000&bbox=24.780370%2C60.206566%2C24.930547%2C60.245707&kohdeluokka=12111,12112. The nimi_suomi = 'Länsiväylä' part is evaluated at oskari-server side for each feature while reading them from the response.

@ZakarFin
Copy link
Member

I wonder how and if this works with the newly merged oskariorg/oskari-frontend#2368

@rekjuh
Copy link
Contributor

rekjuh commented Oct 28, 2024

@jampukka what's the current situation with this issue? We're moving all the issues to Oskari-documentation repo. If you wish to keep this open and get updates, please create a new issue here: https://github.com/oskariorg/oskari-documentation/issues

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

3 participants