2

I'm new to QGIS and may not have understood the principle properly yet. I'm coming from database development.

Question: I have a stored procedure in SQL Server that uses a date range as a parameter. The result is a list of georeferenced points. I would like to add this list in QGIS 3.8 as a layer. Is that possible? From a stored procedure? If not, how could I do that?

Background: In the stored procedure, complex calculations occur that depend on the entered date range. Therefore, you cannot output the list as a view and filter it in QGIS. The result would be different.

  • 1
    In what format is the result? You export it from SQL Server? What do you mean by SQL Server? If you in result have georeferenced points why it is not possible to open in it QGIS, what you have try and what is not working? – GSienko Oct 20 '19 at 22:35
  • does the procedure produce an indexed view? then if that has a geom/geography spatial field then that will be view-able in QGIS. – Mapperz Oct 21 '19 at 1:19
  • Generally speaking, it is not the best design to create a computationally challenging query, and use this as the basis of a mapping layer. Far better to generate an output product which can be indexed and cached, so that repetitive query doesn't overload the database server. Even it were possible (which I doubt), it would likely be unwise to implement. – Vince Oct 21 '19 at 2:37
  • So far I have indexed views that contain georeferenced points and are directly integrated from Microsoft SQL Server. This works. But I have understood that in the GIS environment it makes sense to export the data. I will do that. Thanks @Vince. – Karsten Oct 23 '19 at 10:35

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.