[postgis-users] GeomUnion problem

Paul Ramsey pramsey at refractions.net
Mon May 7 16:31:54 PDT 2007


Brent, wrap your output in the "multi()" function, which will fluff 
everything up to aggregate geometries.

Brent Wood wrote:
> 
> Hi all,
> 
> GEOS v3rc3 seems to have fixed the previous problem, but now I have another
> one!
> The usual Hydra like situation :-)
> 
> geomunion() sometimes returns a multipolygon, & at other times it returns a
> polygon, depending I guess, on what it finds when it does it's thing.
> 
> Is it possible to force all the output to multipolygon, so both single polygons
> & multi's can go in the same column?
> 
> Or can I populate two columns, then somehow insert the polygons as multi's into
> the multi column?
> 
> I could do this by exporting as text, pass the file through awk/sed to turn
> polygons into multi's, then insert them into the multi table.
> 
> 
> I guess another approach might be a view unioning the two columns into one, as
> the are both geometry datatypes as far as postgres is concerned, but this has
> other impacts which are not very nice.
> 
> Any suggestions/advice appreciated.
> 
> 
> Thanks (again!)
> 
> 
>    Brent Wood
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 

   Paul Ramsey
   Refractions Research
   http://www.refractions.net
   pramsey at refractions.net
   Phone: 250-383-3022
   Cell: 250-885-0632



More information about the postgis-users mailing list