[postgis-users] Support in ST_ConvexHull syntax

Sandro Santilli strk at keybit.net
Wed Oct 19 06:28:48 PDT 2011


On Wed, Oct 19, 2011 at 01:23:28PM +0000, Gery . wrote:
> 
> 
> Hello,
> 
> After reading a while, I don't get the polygon from my points table (splitbeam_point) I think it is possible through the following script:
> 
> DROP TABLE testone;
> CREATE TABLE testone(
> ID INT
> );
> SELECT AddGeometryColumn('public', 'testone', 'geom', 4326, 'POLYGON', 2);
> CREATE INDEX testone_geom ON testone USING GIST ( geom );
> INSERT INTO testone SELECT ST_ConvexHull(ST_Collect(geom)) AS testone_geom FROM splitbeam_point GROUP BY ID;
> 
> I get this error message:  column "id" is of type integer but expression is of type geometry

Your SELET must yeld an INT and then a GEOMETRY, you're only generating a
GEOMETRY, which is not an integer, as the message says.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-users mailing list