Open danceb opened 5 days ago
Are you requesting the final result directly from the qgis server of from the ogc service? Could you submit a PR for the fixes?
Via ogc service. As I couldn't find a solution for two of the four mentioned issues, I wouldn't submit a PR at the moment ...
It is likely the ogc service which is filtering out the layers. Try querying directly from the qgis server (you can expose the port (say to 8001
) in the docker-compose.yml and query http://localhost:8001/ows/project_name?SERVICE=WMS&...
.
Yes, the ogc service is filtering out all the layers, which contain special characters in the layer name... But it does this only with using the "wms_geotiff_output" plugin.
I don't get it, why ...
The plugin is using import xml.dom.minidom
, while the ogc service is using from xml.etree import ElementTree
to handle the capabilities xml. Maybe the packages are handling the reading/saving of xml a little different?
Can you attach or PM the two capabilities files with and without the plugin?
For sure: capabilities_xml.zip
Within the archive you can find four xml files. Direct qgis server request and via ogc service, each with and without plugin. Unfortunately, I could'nt find any key difference, besides the missing layers in ogc service with plugin ...
edit: just checked, the layers with special characters are regularly written to the ogcConfig.json
and permissions.json
via the config server, so the ogc service should read them correctly.
Using the "wms_geotiff_output" plugin, the xml which is requested with
GetCapabilities
andGetProjectSettings
is disturbed in several ways.UTF-8
anymore, so special characters are not printed properly<Format>image/tiff</Format>
is insertedthe last two points could be solved by changing [1] to:
But I could not get the document requested in
utf-8
with correct special characters and didn't find the reason, why parts are skipped in the request answer.If I print
xmlString
to the console before [2], the print output contains all the layers. But somehow they are missing within the final result.[1] https://github.com/qwc-services/qwc-qgis-server-plugins/blob/main/wms_geotiff_output/wms_geotiff_output.py#L161-L163 [2] https://github.com/qwc-services/qwc-qgis-server-plugins/blob/main/wms_geotiff_output/wms_geotiff_output.py#L164