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.

George

On Tue, May 18, 2010 at 3:07 PM, sunpeng <blueva...@gmail.com> wrote:

> hi, now,i know how to use quartum gis to load a postgres table with gemetry
> columns: the table is like:
> CREATE TABLE pois
> (
>    uid integer not null,
>    name VARCHAR(128),
>    catcode VARCHAR(32)  not null,
>    catname VARCHAR(32),
>    others VARCHAR(32)
> )
> WITH (
>   OIDS = FALSE
> )
> ;
> SELECT AddGeometryColumn('pois', 'location', 4214, 'POINT', 2);
>
> now ,i have another table:
> create table DM_POIS_CLUSTER (
>    UID                  INTEGER                 not null,
>    CLUSTER_ID_0         INTEGER                 null,
>    constraint PK_DM_POIS primary key (UID),
>    constraint FK_DM_POIS foreign key (UID) references POIS (UID)
> );
> then ,how to load the following sql result into quartum gis?
> SELECT ST_AsText(ST_ConvexHull(ST_Collect(location))) from
> pois,DM_POIS_CLUSTER goup by CLUSTER_ID_0 ;
>
> it seems qgis only load a table with geometry column.
> thanks a million!
>
> sun peng
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>


-- 
George R. C. Silva

Desenvolvimento em GIS
http://blog.geoprocessamento.net
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to