« Return to Thread: How to identify start node and end node in shortest_path_astar when the user click 2 points on the map?

Re: GeomUnion returns a Null geometry

by Markus Schaber-7 :: Rate this Message:

Reply to Author | View in Thread

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
_______________________________________________
postgis-users mailing list
postgis-users@...
http://postgis.refractions.net/mailman/listinfo/postgis-users

 « Return to Thread: How to identify start node and end node in shortest_path_astar when the user click 2 points on the map?