[postgis-users] ST_Boundary of some linestrings

lisek lichu lisek.lichu at gmail.com
Tue Nov 18 07:25:25 PST 2008


Oh men thanks!!

I read about ST_Collect but I didn't know exactly what it does :)
It works thanks a lot :P

Simon

On Tue, Nov 18, 2008 at 15:50, Stephen Woodbridge
<woodbri at swoodbridge.com>wrote:

> lisek lichu wrote:
>
>> Hello,
>>
>> I hane in my database 6 linestrings and I want to get the boundary
>> rectangle from them (not from each of them)
>>
>> If i use:
>> select AsText(ST_Boundary(the_geom)) from segments;
>>
>> i get
>>
>> MULTIPOINT(-8.593025208 41.180818082,-8.594827652 41.187632944)
>> MULTIPOINT(-8.594827652 41.187632944,-8.591823578 41.193090782)
>> MULTIPOINT(-8.591823578 41.193090782,-8.611950874 41.190119708)
>> MULTIPOINT(-8.611950874 41.190119708,-8.613796234 41.179203081)
>> MULTIPOINT(-8.613796234 41.179203081,-8.602809906 41.180559684)
>> MULTIPOINT(-8.602809906 41.180559684,-8.593025208 41.180818082)
>>
>>
>> but i need one big Boundary. (should I group them by some atribute or
>> there is some siplier way to do that?)
>>
>
> select AsText(ST_Envelope(ST_Collect(the_geom))) from segments;
>
> Does this work for you?
>
> -Steve
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20081118/a58a47e2/attachment.html>


More information about the postgis-users mailing list