[postgis-users] GeomUnion function
Hubert Fröhlich
hubert.froehlich at bvv.bayern.de
Tue May 18 07:24:38 PDT 2004
Hi list,
I am working with Postgis 0.8.1 and GEOS 1.0.0, PostgreSQL 7.4.1 .
I want to use the GeomUnion(geometry1, geometry2) function.
When I apply GeomUnion on two arbitrary MULTIpolygons, I receive
MULTIPOLYGONS or POLYGONS, depending on the relationship between the two
geometries.
However, when I want to insert the result into a table, I have to decide
upon using only one geometry type.
If the result is a MULTIPOLYGON and I insert a to a table with
MULTIPOLYGONS, everything is fine.
If the result is a POLYGON and I insert a to a table with MULTIPOLYGONS,
I get a constraint violation like
ERROR: new row for relation "lkrx" violates check constraint "$2"
What I need is a function converting Polygons into Multipolygons or a
GeomUnion function forcing MULTI... results.
How can I do that?
Regards,
Hubert
--
-------------------------------------------------------------------------------
Dr.-Ing. Hubert Fröhlich
Bezirksfinanzdirektion München
Alexandrastr. 3, D-80538 München, GERMANY
Tel. :+49 (0)89 / 2190 - 2980
Fax :+49 (0)89 / 2190 - 2997
hubert dot froehlich at bvv dot bayern dot de
More information about the postgis-users
mailing list