I'm trying to figure out whether it's just me, or if I'm forgetting a setting. I have a shapefile which I make available for WFS-requests. Now I added a join (to a MySQL table).

I tried playing around a bit with permissions, and added all (insert/update/delete/select) for both the layer and the table. I also checked "fields" in the layer - I see the fields I join there. All the WFS-fields are checked, so I am expecting all the fields to be available/listed in the WFS response.

But the joined ones don't show in in the WFS response.

QGis 2.6 on Debian.


I can confirm that joined tables are properly served by QGIS server as WFS

my setup: postgres geometry_table
postgres attribute_table

The tables are joined by QGIS desktop (add geometry table as a layer, add attribute table as table, layer-properties->join and select table and fields to join on)

Using QGIS desktop, check that the join works by inspecting an object in the geometry layer and check that the joined attribute data is displayed correctly

Save the QGIS project and add it to QGIS server. Create a new QGIS desktop project and add the WFS layer from your GIS server. Select an object from the resulting WFS layer and check that all joined attributes are available.

Works with QGIS 2.18 on Ubuntu 16.04 (both desktop and server).

If QGIS server is not working as expected, add the following line to your Apache QGIS server configuration:

FcgidInitialEnv QGIS_SERVER_LOG_FILE /tmp/qgis-000.log

Restart apache and check log file /tmp/qgis-000.log for problems.

One possible problem is performance. QGIS server is likely doing the join (not the database). This would work fine if the join is done once per fcgi process. If done for every request, the join might become a big peformance hog?

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.