3liz / lizmap-docker-compose

Run Lizmap stack with docker-compose
30 stars 42 forks source link

GeoJSON output does not seem to work for WFS service #47

Closed cybernar closed 1 year ago

cybernar commented 1 year ago

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

2) 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 :

Gustry commented 1 year ago

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

cybernar commented 1 year ago

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

cybernar commented 1 year ago

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 :

cybernar commented 1 year ago

Hello,

finally I resolved my problem on WFS with PostGIS layers.

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

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 1 year ago

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