[Qgis-user] Best practice, database vs WFS

Paul Wittle paul.wittle at dorsetcouncil.gov.uk
Thu Jan 7 01:40:06 PST 2021

Thanks Bernhard,

That is definitely a good point regarding the XML format and I was concerned about the indexing although I thought the application mostly handled it because requests to the server would normally be limited by bounding box and the server creating the WFS response should be using the indexes. That said; it is clear that we need to rethink the WFS idea further.

I had been meaning to look into the foreign data wrappers but I confess I had not thought of using it to that end.

I've also been looking into GeoNetwork (good for INSPIRE) and GeoNode but struggling a little to work out the difference. I notice that GeoNode integrates with QGIS but still returns the data as WFS/WMS.

It looks like there are a number of possible solutions but at present it seems we will have to consider the options again and change our strategy accordingly. I have already created a python plugin for QGIS which reads metadata from GeoServer and populates a list of available layers. I had been developing the concept of then allowing the user to choose which format to use (direct access to db, WFS or WMS). At present this appears to be the best approach but we may need to redesign our ideas for the database setup accordingly if users will be preferring direct db layers in QGIS.

Thanks for your comments, they are very useful.

-----Original Message-----
From: Qgis-user <qgis-user-bounces at lists.osgeo.org> On Behalf Of qgis-user-request at lists.osgeo.org
Sent: 06 January 2021 20:00
To: qgis-user at lists.osgeo.org
Subject: Qgis-user Digest, Vol 179, Issue 14

Send Qgis-user mailing list submissions to
        qgis-user at lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to
        qgis-user-request at lists.osgeo.org

You can reach the person managing the list at
        qgis-user-owner at lists.osgeo.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of Qgis-user digest..."

Today's Topics:

   1. Re: Best practice, database vs WFS (Bernhard Str?bl)
   2. Reduce the size in proportion (krishna Ayyala)


Message: 1
Date: Wed, 6 Jan 2021 17:10:39 +0100
From: Bernhard Str?bl <bernhard.stroebl at jena.de>
To: qgis-user at lists.osgeo.org
Subject: Re: [Qgis-user] Best practice, database vs WFS
Message-ID: <2586d8c5-3b0a-b695-ba1d-83060c40f63b at jena.de>
Content-Type: text/plain; charset=utf-8; format=flowed


I want to add my 2 cents (all AFAIK):
WFS is a standard for data exchange as has been pointed out by Alessandro already. The data are in an XML format (GML) which is _slow_ compared to data from a database for several reasons. QGIS downloads the complete layer as GML which, depending on the amount of datasets, can be huge. There is no spatial index helping QGIS in rendering. Using a layer from a database is fast because - assuming you created a spatial index - QGIS only loads the data needed for the particular part of the map you are currently viewing.

AFAIU you are running different database systems in you network (or different instances of the same system or different databases on one system). Depending on the amount of layers e.g. PostreSQL's concept of foreign data wrappers might be a solution (I do not know anything about performance though) enabling you to bundle all your layers in one PostgreSQL database.

Apart from the technical perspective: If you have e.g. several hundred layers you will always face the problem of how users know where to find a particular layer, even if theses layers are all in the same database (same would be true for several hundred WFS layers on one server btw).
In this case you will always need some kind of metadata system where users can search for data and that tells them how they can access them.


This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433

More information about the Qgis-user mailing list