3

I have the following problem:

I have 2 vector layers from PostGIS datastores: "firepoints" and "threats". The corresponding tables "firepoints" and "threats" have IDs and other attributes. They are related via a foreign key "id_firepoint" in "threats" table. One threat can have multiple firepoints, but one firepoint can have only one threat.

What I need to do is to filter WMS layers in Openlayers using CQL filters: first I want to filter the "firepoints" layer using some attribute ("satellite", for example) and then apply the derived IDs to filter "threats" layer using the "id_firepoint" attribute.

The problem is that I don't know how to derive the list of IDs of filtered "firepoints".

I have tried using the Cross-layer filtering with "querylayer" module, but I don't think that I understood how to use it correctly.

This is the filter that I try to apply to the "GSS:threats" layer:

id_firepoint IN queryCollection('GSS:firepoints','id','satellite = AQUA')

Is there any way to filter a layer related to another layer using dynamically changing attributes?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.