0

I have a varchar(max) column in a SQL Server table that contains WKT that I want to display in QGIS.

I can't change the database, so can this be rendered as polygons in QGIS?

I have seen this thread and this one about Importing CSV, but I want to do this dynamically on a database table not as a one-off, so that whenever I refresh the table the polygons (all the WKTs are POLYGONs or MULTIPOLYGONs) are also refreshed.

Does that make sense?

4
  • 1
    Welcome to GIS SE. As a new user, please take the Tour. Your goal here is a violation of best practice. Converting text to geometry is expensive. To do it with every query is needlessly expensive, and abandons the possibility of spatial indexing. You would be better off finding a way to change the database.
    – Vince
    Commented Feb 5 at 13:27
  • Thanks. There doesn't seem to be anything on that Tour page about Best Practice. Should there be? Commented Feb 5 at 14:50
  • No, the Tour is meta for the site. This particular best practice is a general IT principle.
    – Vince
    Commented Feb 5 at 15:22
  • Research Virtual Layers
    – Bera
    Commented Feb 5 at 16:22

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.