Geographic Information Systems Asked by Darth Kangooroo on December 21, 2020
I have set up a QIS server (3.4) to serve WMS layers with a PostGIS database.
The WMS queries include a dynamically created FILTER clause.
However, the official documentation is quite lacking explanations for the FILTER clause and I have troubles with filtering based on boolean attributes.
I want to filter based on zico IS true
where, in the PostGIS database, zico is a boolean field of the table locations.
I have tried:
http://qgis.localhost/cgi-bin/qgis_mapserv.fcgi?MAP=/home/qgis/projects/my_qgis_project.qgs&service=WMS&request=GetMap&layers=locations&styles=&format=image/png&transparent=true&version=1.3.0&srs=EPSG:3857&width=256&height=256&crs=EPSG:3857&bbox=2504688.5428486555,3757032.8142729844,3757032.814272984,5009377.085697314&FILTER=locations:%22zico%22%20IS%20True
i.e. including FILTER:locations:'zico' IS True
in the query to the WMS server,
for which the server response was the standard error message
The filter string "zico" IS False has been rejected because of
security reasons. Note: Text strings have to be enclosed in single or
double quotes. A space between each word / special character is
mandatory. Allowed Keywords and special characters are
IS,NOT,NULL,AND,OR,IN,=,<,>=,>,>=,!=,’,’,(,),DMETAPHONE,SOUNDEX. Not
allowed are semicolons in the filter expression.
What is the proper syntax for FILTER with boolean attributes?
Try with the following(double quote):
locations:"zico" IS True
Answered by niki oro on December 21, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP