[Qgis-user] QGIS Server: parametrised sql for WMS/WFS

Tomas Straupis tomasstraupis at gmail.com
Sun Aug 25 11:03:00 PDT 2019


Hello

  I have a question about database layers served by QGIS Server as
WMS/WFS services.

  Do I understand correctly, that it is only possible to filter
WMS/WFS query results on values of returned fields when using QGIS
Server. That is if we have a layer query:

  select a, b, c from table

  then it will be possible to filter on values of a, b or c.

  But it is NOT possible to pass a parameter and a value which would
be used in a query itself. For example we could have a parameter value
given to WMS/WFS request p=1 and then this could be used in a layer
query written like this:

  select a, b, c from table where (%p%=1 and a<1000) or (%p%=2 and b<1000)

  (this type of parameters is supported by geoserver, I'm looking into
possibility to migrate to QGIS Server)

  Thank you

-- 
Tomas


More information about the Qgis-user mailing list