QGIS Quick Tip - Python, SQL and Virtual Layers

preview_player
Показать описание
In this episode I use a small Python script to get a attribute list from a selected field, and from only selected features.
Then I use Virtual Layers and a SQL command to create a single multi-polygon layer for those selected features.
Рекомендации по теме
Комментарии
Автор

A heartfelt thank you for sharing! Your videos are absolutely fantastic!

pythonGIS
Автор

Hi Klas,

We can use the 'Speedy Layer' plugin for create the layer for use in SQL editor.

With that plugin we can create a memory layer with the selects features, this is a option of plugin, and use in SQL editor directly, not needing use the Python console and filter in SQL

MOTTALUIZTUBE
Автор

Dear Klas!
Thanks you for a lesson.
But i have one problem. When i trying to unite few polygons with 1 atribute i see next error:
"layer is not valid"
i use qgis 2.18.14 with windows 7
What could be the reason?

ВинсНуар-гб
Автор

I selected a subset of line features that intersect with a polygon layer. Is it possible to modify the SQL query to list/group the selected line features by the polygon that they intersect with? For example, a result that lists: Polygon1 has line1, line2, line5. Polygon2 has line3, line4. As always, thanks for the video, it makes learning QGIS much more approachable.

courtney_geographic