Open jmacura opened 1 year ago
Was investigating this issue a bit, here's what I have found so far:
there are basically two options how to filter the results POST with filterEncoding
or GET with CQL strings
both complicate WFS loading bounded by BBOX as its not possible to use BBOX parameter along with CQL_FILTER or FILTER as it results in an error
<ows:ExceptionText>bbox and cql_filter both specified but are mutually exclusive</ows:ExceptionText>
. Here is a short discussion on the topic ...we could remove the BBOX when filtering by attributes but I am not sure thats what we want
It is possible to integrate the bbox into both of them but there is a problem - geometry name
. In order to filter features spatialy we need to filter against the geometry property of the features which has an arbitrary name. . I mean it is usualyl something with 'geom' in it but it doesnt have to.
It is possible to retrieve attribute names along with their types using DescribeFetureType
request but I have tried only few and it might get bit sketchy because type strings differ among the output formats eg JSON vs XML. See this vs this or that vs that. JSON types seem to be simpler but its not guarantee that all services support it. And there are multiple types that could be used. If we assumed all the types come from GML namespace we could be on right path but what if there are multipe gml typed attributes?
apart from that OL has functionality that could be used to set up filterEncoding requests which seem as a reasonable choice. writeGetFeature + filters
Thanks for investigating the issue! Check the implementation here https://github.com/hslayers/applications/tree/euhubs4data/EUHubs4Data/src/app/filter-panel which is basically what I mean to port to HSLayers code. It has some limitations and missing pieces though, which I can't well remember all 🙁
Feature Request
Is your feature request related to a problem? Please describe. WFS layer can contain millions of features. The response from WFS server is thus slow and transferred data very large. By applying filter of attributes/attribute values, the amount of transferred and displayed data is reduced.
Describe the solution you'd like Create new panel for filtering WFS layers. Possibly also other filterable layers.
Describe alternatives you've considered none
Additional context Desired for EUHubs4Data project. See https://redmine.ccss.cz/issues/9569