This may be a dumb question, but is there way to run a PostGIS geoprocessing SQL query in QGIS? Specifically, I am thinking of running SQLs such as ST_Union, ST_Split etc etc.
I have tried the following SQL in the QGIS PostGIS Query Editor without any luck, while the query worked in PostGIS.
SELECT covtype, ST_Multi(ST_Union(f.the_geom)) as sGeom
INTO testLCC
FROM lcc2000_001k AS f
GROUP BY covtype;
SELECT populate_geometry_columns
('testLCC'::regclass);
ALTER TABLE testLCC ADD CONSTRAINT pkid PRIMARY KEY(covtype);
Answer
You want PgQuery for QGIS
Can be downloaded via Fetch Python Plugins in QGIS and filter for pgquery
No comments:
Post a Comment