[postgis-users] GeomUnion problem

Rob Agar robagar at westnet.com.au
Mon May 7 16:50:38 PDT 2007


hi Brent

Would just wrapping the call to GeomUnion with a call to Multi do the trick?

 From the docs:
Multi(geometry) - Returns the geometry as a MULTI* geometry. If the 
geometry is already a MULTI*, it is returned unchanged.

hth
Rob

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
> 




More information about the postgis-users mailing list