Build a view with that query. Register the geometry in geometry_columns table and you're set. But remov that AsText, otherwise you wont have a geometry column.<br><br>George<br><br><div class="gmail_quote">On Tue, May 18, 2010 at 3:07 PM, sunpeng <span dir="ltr"><<a href="mailto:bluevaley@gmail.com" target="_blank">bluevaley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">hi, now,i know how to use quartum gis to load a postgres table with gemetry columns: the table is like:<br>
CREATE TABLE pois<br>(<br> uid integer not null, <br> name VARCHAR(128),<br> catcode VARCHAR(32) not null, <br>
catname VARCHAR(32),<br> others VARCHAR(32)<br>) <br>WITH (<br> OIDS = FALSE<br>)<br>;<br>SELECT AddGeometryColumn('pois', 'location', 4214, 'POINT', 2);<br><br>now ,i have another table:<br>
create table DM_POIS_CLUSTER (<br> UID INTEGER not null,<br> CLUSTER_ID_0 INTEGER null,<br> constraint PK_DM_POIS primary key (UID),<br> constraint FK_DM_POIS foreign key (UID) references POIS (UID)<br>
);<br>then ,how to load the following sql result into quartum gis?<br>SELECT ST_AsText(ST_ConvexHull(ST_Collect(location))) from pois,DM_POIS_CLUSTER goup by CLUSTER_ID_0 ;<br><br>it seems qgis only load a table with geometry column.<br>
thanks a million!<br><br>sun peng<br><br><br>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@postgis.refractions.net" target="_blank">postgis-users@postgis.refractions.net</a><br>
<a href="http://postgis.refractions.net/mailman/listinfo/postgis-users" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>George R. C. Silva<br><br>Desenvolvimento em GIS<br><a href="http://blog.geoprocessamento.net" target="_blank">http://blog.geoprocessamento.net</a><br>