Hot answers tagged

4

cur.execute(sql) rows = cur.fetchall() for row in rows: print row or for one record: row = cur.fetchone() print row


1

Try UNION ALL for collecting all the geometries before running ST_COLLECT. SELECT ST_Collect(geometry) FROM (SELECT geometry from tbl1 UNION ALL SELECT geometry from tbl2 UNION ALL SELECT geometry from tbl3 UNION ALL SELECT geometry from tbl4);


1

A solution was actually buried in this answer, which I could modify for my problem: SELECT MakeLine(p0.geom, p1.geometry) AS link_line FROM "buildings_p0" p0, "roadpoints_p1" p1 WHERE p1.pid = p0.id;



Only top voted, non community-wiki answers of a minimum length are eligible