I would like to read a WFS published using QGIS server, with the plugin Leaflet-WFST but an error occurs when the plugin is trying to read the geometry.

Error :

uncaught exception: unknown child element Point

Result of the WFS POST request:

<gml:boundedBy xmlns:gml="http://www.opengis.net/gml">
    <gml:Box srsName="EPSG:4326">
        <gml:coordinates cs="," ts=" ">-4.07446736,52.4326541
<qgs:geometry xmlns:qgs="http://www.qgis.org/gml">
    <Point xmlns="http://www.opengis.net/gml" srsName="EPSG:4326">
        <coordinates xmlns="http://www.opengis.net/gml" cs="," ts=" ">-4.07446736,52.4326541</coordinates>
<qgs:_URI xmlns:qgs="http://www.qgis.org/gml">uuid:858df484-a17e-45b0-b740-0639f530d946</qgs:_URI>
<qgs:SITE_DETAILS_OBSERVER xmlns:qgs="http://www.qgis.org/gml"/>
<qgs:crationdate xmlns:qgs="http://www.qgis.org/gml">2019-01-24T13:35:37</qgs:crationdate>
<qgs:diamtrunk xmlns:qgs="http://www.qgis.org/gml">20</qgs:diamtrunk>
<qgs:heighttrunkmesure xmlns:qgs="http://www.qgis.org/gml">1.3</qgs:heighttrunkmesure>
<qgs:species xmlns:qgs="http://www.qgis.org/gml">Pinus-sylvestris</qgs:species>
<qgs:circumference xmlns:qgs="http://www.qgis.org/gml">62.8318530717959</qgs:circumference>
<qgs:crownxaxis xmlns:qgs="http://www.qgis.org/gml">3</qgs:crownxaxis>
<qgs:crownyaxis xmlns:qgs="http://www.qgis.org/gml">1</qgs:crownyaxis>
<qgs:crownorientation xmlns:qgs="http://www.qgis.org/gml">20.67</qgs:crownorientation>.

Additional information:

Points came from a PostGIS database (postgresql 9.5 postgis 2.2) then publish using QGIS 2.18.16

The WFS can be read perfectly using a remote computer and QGis desktop

The GetCapabilities of the service:

Leaflet code:

var layer2=new L.WFS({
                url: '',
                typeName: 'ind_trees',
                crs: L.CRS.EPSG4326,
                style: {
                  color: 'red',
                  weight: 3
  • Can you read other WFS services using the plug in? – til_b Feb 4 at 16:27
  • When I try to access the WFS from this codepen: codepen.io/anon/pen/QYMJym i get a CORS error in the browser console (after pressing F12). This may also be contributing factor to the problem. – til_b Feb 5 at 12:55
  • Thank you but is more a copy paste error when I wrote the question. I edited the question. – user136412 Feb 5 at 15:53
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Fran Raga Feb 5 at 16:58
  • I can read other WFS using the plugin as suggested in the turorial. But every WFS that I tried to read came from mapserver or geoserver I did not find any QGIS server to test. – sebastien 10 hours ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.