I'm pretty new to databases and SQL, so sorry for the noise..
I have 2 layers and I want to make a clip of layer 1 with layer 2 in SpatiaLite (I'm using the DB Manager within QGIS).
That's the code I'm using:
create table clipped_lines as
select * from lines, estensione
where st_intersects(lines.GEOMETRY, extension.geom)
The table is created but it is not a geographical object so I cannot add it to the QGIS map canvas.
The problem (I think) is that the geom column is seen as a normal column and not as a GEOMETRY column. I've tried to update the column with:
ALTER TABLE clipped_lines
ALTER COLUMN geom TYPE GEOMETRY(LineString,4326);
but nothing happened.
I thought that the st_intersects
function updates automatically the geom column..
Thanks
Aucun commentaire:
Enregistrer un commentaire