[postgis-users] Two geometries same column

Bob Pawley rjpawley at shaw.ca
Sat Jul 25 11:30:54 PDT 2009


Hi

I ahve two geometries say A and B in the same column.

I want to make a line between geometry A and geometry B.

How can I write the expression so that Postgresql recognizes that A and B are in separate rows?

I have tried the following which produces a null return.

update a --p_id.image
  set one = --the_geom =  
 (select st_makeline(st_makepoint(st_x(st_centroid(p_id.image.the_geom)), st_y(st_centroid(p_id.image.the_geom))),
  st_centroid(p_id.image.the_geom)) 
  from p_id.image
  where (p_id.image.fluid_id =  '1513'
  and p_id.image.description = 'A')
  and (p_id.image.fluid_id = '1513'
  and p_id.image.description = 'B'))

Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20090725/c7b5dd18/attachment.html>


More information about the postgis-users mailing list