[postgis-users] GeomUnion returns a Null geometry
Markus Schaber
schabi at logix-tt.com
Mon Oct 2 01:36:20 PDT 2006
Hi, Arnaud,
Arnaud Lesauvage wrote:
> I slept on this and rewrote my queries from scratch. They now work fine !
> I believe that I had some null geometries in the union before and not
> anymore.
> Does a geomunion return null whenever one of the geometries is null ?
The GeomUnion() function is defined as strict, so it does.
You can use the COALESCE(geom, 'GEOMETRYCOLLECTION(EMPTY)') to work
around this.
>From looking at the source, the GeomUnion() aggregate seems to deal fine
with NULLs, but currently seems to return NULL when there are no
geometries at all. Maybe we should change it to return an empty geometry
instead.
Strk, what do you think about it?
Regards,
Markus
--
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf. | Software Development GIS
Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org
More information about the postgis-users
mailing list