[postgis-users] [postgis-devel] Is there a reason we don't have an ST_Intersection aggregate function
Nicklas Avén
nicklas.aven at jordogskog.no
Tue Sep 2 05:27:19 PDT 2014
I guess you can use coalesce to replace the null values with something you want. In your case I think an empty geometry will give you the complete first geometry.
/Nicklas
Skickat från min Samsung Mobil.
<div>-------- Originalmeddelande --------</div><div>Från: Komяpa <me at komzpa.net> </div><div>Datum:2014-09-02 13:59 (GMT+01:00) </div><div>Till: PostGIS Development Discussion <postgis-devel at lists.osgeo.org> </div><div>Kopia: PostGIS Users Discussion <postgis-users at lists.osgeo.org> </div><div>Rubrik: Re: [postgis-users] [postgis-devel] Is there a reason we don't have an ST_Intersection aggregate function </div><div>
</div>There's another thing with ST_Intersection/ST_Difference: sometimes you have to make ST_Difference(geom, (select ST_Union(..,) where ...)) while second operand evaluates to NULL (you shouldn't crop geometry). Currently that leads to ST_Difference pushing out NULL. for my use case, that's not desired semantics - can it be changed?
2014-09-01 4:16 GMT+03:00 Paragon Corporation <lr at pcorp.us>:
I wasn't sure if we just thought there wasn't much utility in it or if there
was a technical obstacle.
I would think that would be easier to build than the other aggregates since
as you add more geometries it shrinks and the current aggregate state is
always the result of the previous state plus new geometry (so no need for an
accumulation function or a final state function) and if you ever end up with
a geometry collection, you short-circuit out.
Thanks,
Regina
_______________________________________________
postgis-devel mailing list
postgis-devel at lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
--
Darafei "Komяpa" Praliaskouski
OSM BY Team - http://openstreetmap.by/
xmpp:me at komzpa.net mailto:me at komzpa.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20140902/8b8639be/attachment.html>
More information about the postgis-users
mailing list