Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFS provided by Qgsis server #725

Open
geo2france2024 opened this issue Dec 23, 2024 · 3 comments
Open

WFS provided by Qgsis server #725

geo2france2024 opened this issue Dec 23, 2024 · 3 comments

Comments

@geo2france2024
Copy link

I am trying to declare a new WFS web service in the Géo2France mapstore. But no layer is found. I have no error message.
URL of the service : https://qgisserver.hautsdefrance.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/data/qgis/applications/admin_elu_region.qgs&service=WFS&request=GetCapabilities
(This is the case for all services produced by my qgis server)

Vincent

@landryb
Copy link
Member

landryb commented Dec 31, 2024

That's... interesting. The getcapabilities is correctly fetched by mapstore which adds version=1.1.0 to the url, and we can see a featuretypelist object with 3 featuretype which i suppose are layers.

loading https://qgisserver.hautsdefrance.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/data/qgis/applications/admin_elu_region.qgs&service=WFS&request=GetCapabilities&version=1.1.0 in firefox, i dont see featuretypelist in the returned XML, but i see it if querying with curl:

 <FeatureTypeList>
  <Operations>
   <Operation>Query</Operation>
  </Operations>
  <FeatureType>
   <Name>epci_adresse</Name>
   <Title>EPCI - localisation des sièges des EPCI</Title>
   <DefaultSRS>EPSG:2154</DefaultSRS>
   <OtherSRS>EPSG:4326</OtherSRS>
   <OtherSRS>EPSG:3857</OtherSRS>
   <Operations>
    <Operation>Query</Operation>
   </Operations>
   <ows:WGS84BoundingBox dimensions="2">
    <ows:LowerCorner>1.382812 48.968809</ows:LowerCorner>
    <ows:UpperCorner>4.154618 51.037566</ows:UpperCorner>
   </ows:WGS84BoundingBox>
  </FeatureType>
  <FeatureType>
   <Name>antenne</Name>
   <Title>antenne</Title>
   <DefaultSRS>EPSG:2154</DefaultSRS>
   <OtherSRS>EPSG:4326</OtherSRS>
   <OtherSRS>EPSG:3857</OtherSRS>
   <Operations>
    <Operation>Query</Operation>
   </Operations>
   <ows:WGS84BoundingBox dimensions="2">
    <ows:LowerCorner>1.756476 49.030816</ows:LowerCorner>
    <ows:UpperCorner>4.060109 50.953833</ows:UpperCorner>
   </ows:WGS84BoundingBox>
  </FeatureType>
  <FeatureType>
   <Name>maires_com</Name>
   <Title>Maires des Hauts-de-France</Title>
   <DefaultSRS>EPSG:2154</DefaultSRS>
   <OtherSRS>EPSG:4326</OtherSRS>
   <OtherSRS>EPSG:3857</OtherSRS>
   <Operations>
    <Operation>Query</Operation>
   </Operations>
   <ows:WGS84BoundingBox dimensions="2">
    <ows:LowerCorner>1.347217 48.827648</ows:LowerCorner>
    <ows:UpperCorner>4.28559 51.089811</ows:UpperCorner>
   </ows:WGS84BoundingBox>
  </FeatureType>
 </FeatureTypeList>

comparing with a 'working' WFS (well one that lists layers, eg https://data.geopf.fr/wfs/ows?version=1.1.0&service=WFS&request=GetCapabilities) maybe something missing in projections ? or outputformats for getfeature/describefeaturetype ?

  <ows:Operation name="DescribeFeatureType">
   <ows:DCP>
    <ows:HTTP>
     <ows:Get xlink:href="https://qgisserver.hautsdefrance.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/data/qgis/applications/admin_elu_region.qgs"/>
     <ows:Post xlink:href="https://qgisserver.hautsdefrance.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/data/qgis/applications/admin_elu_region.qgs"/>
    </ows:HTTP>
   </ows:DCP>
   <ows:Parameter name="outputFormat">
    <ows:Value>XMLSCHEMA</ows:Value>
    <ows:Value>text/xml; subtype=gml/2.1.2</ows:Value>
    <ows:Value>text/xml; subtype=gml/3.1.1</ows:Value>
   </ows:Parameter>
  </ows:Operation>
  <ows:Operation name="GetFeature">
   <ows:DCP>
    <ows:HTTP>
     <ows:Get xlink:href="https://qgisserver.hautsdefrance.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/data/qgis/applications/admin_elu_region.qgs"/>
     <ows:Post xlink:href="https://qgisserver.hautsdefrance.fr/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/data/qgis/applications/admin_elu_region.qgs"/>
    </ows:HTTP>
   </ows:DCP>
   <ows:Parameter name="outputFormat">
    <ows:Value>text/xml; subtype=gml/2.1.2</ows:Value>
    <ows:Value>text/xml; subtype=gml/3.1.1</ows:Value>
    <ows:Value>application/vnd.geo+json</ows:Value>
   <ows:Value>SHP</ows:Value><ows:Value>TAB</ows:Value><ows:Value>MIF</ows:Value><ows:Value>KML</ows:Value><ows:Value>GPKG</ows:Value><ows:Value>GPX</ows:Value><ows:Value>ODS</ows:Value><ows:Value>XLSX</ows:Value><ows:Value>CSV</ows:Value></ows:Parameter>
   <ows:Parameter name="resultType">
    <ows:Value>results</ows:Value>
    <ows:Value>hits</ows:Value>
   </ows:Parameter>
  </ows:Operation>

iirc (i might be wrong) mapstore queries WFS features using application/json format (maybe here), which isn't listed in the outputformats (there's application/vnd.geo+json but ..) so maybe that's why no layers are listed ?

@vfabry
Copy link

vfabry commented Jan 6, 2025

Thank you Landry for the analyse. I feel like this fits this issue : 3liz/qgis-wfsOutputExtension#29

@landryb
Copy link
Member

landryb commented Jan 6, 2025

Thank you Landry for the analyse. I feel like this fits this issue : 3liz/qgis-wfsOutputExtension#29

maybe that yeah.. but if qgis already provides application/vnd.geo+json maybe that could be only an alias to application/json ? to be discussed with 3liz then...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants