PostGIS ’select’ statement as vector layer in QGIS
Free open-source software (FOSS), Geographic information science/systems (GIS), Helpful tips, How to 1 Comment »Several colleagues of mine have asked whether it is possible to visualise the results of a SELECT statement on a PostGIS database that returns spatial data in QGIS. In other words, can we map the results of something like SELECT id, st_union(the_geom) FROM spatial_table GROUP BY id;. My usual answer to this in the past has been “not yet…”, but now thanks to Giuseppe Sucameli and Jürgen E. Fischer, the answer is a resounding “yes!”. A recent patch to QGIS trunk now makes custom Postgres queries possible via the postgres data provider.