3liz/lizmap-docker-compose

GeoJSON output does not seem to work for WFS service

cybernar opened this issue · 5 comments

Hello,

I have on a new installation with Docker Compose on my laptop. I'm trying various lizmap tools based on WFS, with layers from PostGIS.
Everything related to WMS (GetMap, GetFeatureInfo) works well with layers from PostGIS

But "Locate by layer" and "Attribute table" don't work :(

  1. I checked the WFS requests from my browser.

http://localhost:8090/index.php/lizmap/service?repository=demodocker&project=montpellier_uu&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&GEOMETRYNAME=extent&TYPENAME=commune_uu&OUTPUTFORMAT=GeoJSON

=> Error 500 Internal Jelix Error

  1. But if I try the same request WITHOUT GeoJSON output, it works !

http://localhost:8090/index.php/lizmap/service?repository=demodocker&project=montpellier_uu&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&GEOMETRYNAME=extent&TYPENAME=commune_uu

=> OK, I get a response in GML with extent of polygons

Thank you for your help !

Versions :

  • Lizmap Web Client : 3.6.2
  • Lizmap Web Client target version : 3.6
  • Lizmap plugin : 3.11.0
  • QGIS Desktop : 3.28.4
  • QGIS Server : 3.28.3
  • Py-QGIS-Server : 1.8.7
  • QGIS Server plugin atlasprint : 3.3.2
  • QGIS Server plugin lizmap_server : 1.3.1
  • QGIS Server plugin wfsOutputExtension : 1.7.1
Gustry commented

We are having an issue with export of vector layers in 3.6.2, not only geojson.

I tried the same query for the geojson output, but directly to OWS port :

http://localhost:8091/ows/?map=demodocker/montpellier_uu.qgs&service=WFS&version=1.0.0&request=GetFeature&geometryname=extent&TYPENAME=commune_uu&OUTPUTFORMAT=GeoJSON

It works ! maybe some problem with domain name ?

Cyril

New test with docker version of Lizmap Web Client 3.6.2 : I have made a QGIS project with both shapefile layer & PostGIS layer.
I have published these layers in WFS. I try to use "Locate by layer" and "Attribute table" with these layers
Result :

  • on shapefile layer, everything's ok
  • on PostGIS layer, "Locate by layer" and "Attribute table" don't work (but WMS display is OK)
    I cannot see what is wrong with PostGIS layers.

Hello,

finally I resolved my problem on WFS with PostGIS layers.

To be short : I was using 2 differents PGSERVICEFILE pg_service.conf :

  • the 1st, automatically generated, for the authentication (lizmap users db) with lizmap container
  • the 2nd, that I created, for another GIS db, with map container

That was a bad idea.

The problem is that the connection parameters for data were accessible only for the map container. So the WMS was working, but, examining the lizmap logs, I understood that the lizmap container also need to connect to the data, even for tools such as "Locate by layer" and "Attribute table"

That said, I think a little improvement in docker-compose.yml would be to have a mounted volume for /srv/etc/pgpass.conf in the map container : that is not the case today.

And, by the way, vector download seem to work for me.

Have a nice evening, Cyril

Gustry commented

Ok, thanks for the feedback.
I though it was this issue related to empty export of vector layers