[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] [postgis-devel] Is there a reason we don't have an ST_Intersection aggregate fun
From:       Nicklas_Avén <nicklas.aven () jordogskog ! no>
Date:       2014-09-02 12:27:19
Message-ID: jwp3n0vfk9on51b4aupnsfwq.1409660839415 () email ! android ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

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@komzpa.net> \
</div><div>Datum:2014-09-02  13:59  (GMT+01:00) </div><div>Till: PostGIS Development \
Discussion <postgis-devel@lists.osgeo.org> </div><div>Kopia: PostGIS Users Discussion \
<postgis-users@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@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@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@komzpa.net mailto:me@komzpa.net


[Attachment #5 (text/html)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=UTF-8"></head><body ><div>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.&nbsp;</div><div><br></div><div>/Nicklas</div><div><div \
style="font-size:9px;color:#575757">Skickat från min Samsung \
Mobil.</div></div><br><br><div>-------- Originalmeddelande --------</div><div>Från: \
KomÑpa <me@komzpa.net> </div><div>Datum:2014-09-02  13:59  (GMT+01:00) \
</div><div>Till: PostGIS Development Discussion <postgis-devel@lists.osgeo.org> \
</div><div>Kopia: PostGIS Users Discussion <postgis-users@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><br></div><div \
dir="ltr">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?<br>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-09-01 4:16 \
GMT+03:00 Paragon Corporation <span dir="ltr">&lt;<a href="mailto:lr@pcorp.us" \
target="_blank">lr@pcorp.us</a>&gt;</span>:<br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I wasn't sure if we just thought there wasn't much utility in it or if there<br>
was a technical obstacle.<br>
<br>
I would think that would be easier to build than the other aggregates since<br>
as you add more geometries it shrinks and the current aggregate state is<br>
always the result of the previous state plus new geometry (so no need for an<br>
accumulation function or a final state function) and if you ever end up with<br>
a&nbsp; geometry collection, you short-circuit out.<br>
<br>
Thanks,<br>
Regina<br>
<br>
<br>
_______________________________________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel" \
target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel</a><br> \
</blockquote></div><br><br clear="all"><br>-- <br>Darafei "KomÑpa" \
Praliaskouski<br>OSM BY Team - <a href="http://openstreetmap.by/" \
target="_blank">http://openstreetmap.by/</a><br><a href="mailto:xmpp%3Ame@komzpa.net" \
target="_blank">xmpp:me@komzpa.net</a> mailto:<a href="mailto:me@komzpa.net" \
target="_blank">me@komzpa.net</a><br>


</div>
</body>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic