I have 3 tables/shapes as follows:
ADRR (adress points)
ADRR_ID | ST_ID (street surface id) | point geometry
ST_ID | ST_NAME (street name) | polygon geometry
ID_OBS | polygon geometry
Each address point is associated with a portion of street stored in the STREET table.
For each address, I want to check whether there is an obstacle in that STREET portion.
I want a column with a
'N' value to check whether the obstacle is or not present.
In order to do this, I used the VIRTUAL LAYER function in QGIS.
select adrr.* ,(case when st_intersects(adrr.geometry, obstacles.geometry) then 'Y' else 'N' END) V from obstacles, adrr join STREET on street.st_id = adrr.st_id
I don't have any error message but QGIS crashes each time I want to visualise the attributes of the resulting layer.
I created spatial indexes for all my tables but it didn't seem to help. Does anyone have another suggestion?