1

I'm totally new to the field of GIS.

I want to create some GIS-models and publish them on my website. Therefore the models should be connected to my database to constantly have the most recent data.

At the moment I'm working with QGIS Desktop (3.4.2) and created some models, based on some PostGIS data served in a remote database and I also managed to export those models as a leaflet-based website. But it's only a static website with the data requested from the database at that moment.

Now I tried to export / create a dynamic model, that I can publish and that holds a connection to the database, so that I can constantly request the most recent data from the database. But I could not find a method to achieve this.

I installed GeoServer, QGIS server with a QWC2 and also had a look at exporting a QGIS model as a standalone Python-script, but couldn't find a solution. I thought it might be possible to use QGIS as a kind of GIS-IDE (comparable with R / Shiny if you are familiar with that).

Is it possible at all to create such a dynamic GIS model for the web?

Is it possible with QGIS or do I need another tool to accomplish this?

Edit:

A quick example might be the best explanation: At the moment I can visualize all people going from A to B. To narrow the results down to a certain date or date range i need to set appropriate where-clauses in the SQL query. Once having a result I could export his as a website. But this would be static for the set date (range). To get results for another date or date range I would have to export the site once again for these new constraints. And this I would like to automate so that I can just pass arguments somehow to get the results for the set parameters.

Edit2:

After a lot of research i figured out that maybe Geoserver is the tool i need. I have the possibility to create SQL views, also based on parameters and Geoserver serves me the corresponding WMS-response. So far so good. But i still could not figure out how to export QGIS layers to Geoserver. There is this plugin called "Geoserver Explorer" for QGIS but as far as i found it it's only available for QGIS<3.x but i am working with QGIS 3.4. Is there any alternative to "Geoserver Explorer" for QGIS >= 3.0 or how do you publish QGIS projects on Geoserver?

Edit3: I also managed to publish a QGIS project via QGIS Server and it might be visible through QGIS Web Client 2 but then i ran into a deadend regarding passing parameters to the project hosted on QGIS server.

  • 2
    What do you mean by "model"? Are you referring to a Processing Model created using the graphical modeler? – csk Dec 5 '18 at 17:25
  • no, sorry, seems like i mixed up the terms. my 'model' consists just of layers, which get their data from a postgres/postgis database. – user3240316 Dec 6 '18 at 9:25
  • 1
    What do you want to be able to do with the service? WMS should be enough if you only want to look at map layers. You can do this with both Geoserver and QGIS server and show data directly from the database. – BERA Dec 6 '18 at 12:17
  • A quick example might be the best explanation: At the moment I can visualize all people going from A to B. To narrow the results down to a certain date or date range i need to set appropriate where-clauses in the SQL query. Once having a result I could export his as a website. But this would be static for the set date (range). To get results for another date or date range I would have to export the site once again for these new constraints. And this I would like to automate so that I can just pass arguments somehow to get the results for the set parameters. – user3240316 Dec 6 '18 at 12:30
  • Please edit your question in response to the requests for clarification. It's not fair to make people mine through the comments for essential information. – csk Dec 6 '18 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.