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

List:       postgis-devel
Subject:    Re: [postgis-devel] Trying to get st_convexhull to return a bonduing box for a collection of linestr
From:       dave.potts () pinan ! co ! uk
Date:       2016-01-03 21:08:50
Message-ID: 3aebab9aa5a8b8c22b7ec107f7e97454 () dp2642 ! force9 ! co ! uk
[Download RAW message or body]

Got it in one,  I wish  worked than one out.

THANK you.

Dave.

January 3 2016 9:02 PM, "Leknín Řepánek" <godzilalalala@gmail.com> wrote:
> CREATE TABLE t (id serial primary key, geom geometry(LINESTRING, 0));
> 
> INSERT INTO t(geom) values
> ('LINESTRING(0 0,0 1)')
> , ('LINESTRING(0 1,1 1)')
> , ('LINESTRING(1 1,1 0)')
> , ('LINESTRING(1 0,0 0)')
> , ('LINESTRING(1 1,2 1)')
> , ('LINESTRING(2 1,2 0)')
> , ('LINESTRING(2 0,1 0)');
> 
> WITH poly as (
> SELECT ST_POLYGONIZE(geom) g FROM t
> )
> SELECT ST_AsText(ST_UnaryUnion(g)) g FROM poly;
> 
> On Sun, Jan 03, 2016 at 08:12:28PM +0000, dave.potts@pinan.co.uk wrote:
> 
>> Hi
>> 
>> I have  postgis table which includes a series of Linestrings,  I am trying to
>> create a single geometry that includes only the outside layer of line strings.
>> 
>> An example would be if the line strings described  digital 8, formed from
>> squares two boxes,  I would want something looked like a rectangle, 
>> 
>> I have tried things like 
>> 
>> select st_convexhull( st_union(st_startpoint(the_geom),st_endpoint(the_geom)))
>> from bar_table
>> 
>> I assumed that I would get a polygon with the middle bar removed, what I got
>> was a collection of linestrings
>> 
>> Has anybody got any suggestions?
>> 
>> regards
>> 
>> Dave.
>> 
>> _______________________________________________
>> postgis-devel mailing list
>> postgis-devel@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/postgis-devel
> 
> On Sun, Jan 03, 2016 at 09:13:48PM +0100, Michal Fortik wrote:
> 
>> Rok plný úsměvů přejí
>> 
>> Michal, Hanka, Hubert a Lejdy
> 
> _______________________________________________
> postgis-devel mailing list
> postgis-devel@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-devel
_______________________________________________
postgis-devel mailing list
postgis-devel@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/postgis-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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