[postgis-users] linestring aggregation

Nicolas Gillet - MARKET-IP nicolas.gillet at market-ip.com
Tue Dec 29 02:39:32 PST 2009


Hello

 

I am trying to aggregate linestrings together based on their attributes and
the fact that they are touching each other.

 

Therefore I found out how to write a very basic aggregate function :

  

   CREATE AGGREGATE geometry_sum (

                SFUNC = st_union,

                BASETYPE = geometry,

                STYPE = geometry);

 

I can now aggregate my linestrings grouped by their names, importance, and
so on but . I have trouble to group them by the fact that they are touching
each other.

e.g.

linestring A, B and C have the same attributes but only A and B are touching
each other.

I would like as a result A+B in one record, and C in a second record.

 

Does someone have any tips to share ?

 

Thank you,

 

Nicolas

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091229/c423f7ee/attachment.html>


More information about the postgis-users mailing list