[postgis-users] adding additional points to multipoint
    Markus Schaber 
    schabi at logix-tt.com
       
    Fri Mar 31 00:51:42 PST 2006
    
    
  
Hi, Christo,
Christo Du Preez wrote:
> How do I add an additional point to a multipoint geometry in an update
> statement?
select asText(geomunion('MULTIPOINT(1 1,3 3)','POINT(2 2)'));
         astext
-------------------------
 MULTIPOINT(1 1,2 2,3 3)
(1 row)
So you can
  UPDATE geocolumn = geomunion(geocolumn,'YOURPOINT') WHERE condition;
However, note that you don't have any influence on the ordering of the
points in the resulting multipoint, it depends on the internal geometry
indexing in geomunion.
Strk, maybe we should allow addpoint() to work with multipoints, too?
Or as alternative, add an "addgeom(collection, geometry)" that adds a
geometry to a MULTI*/GeometryCollection?
HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS
Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org
    
    
More information about the postgis-users
mailing list