Re: [postgis-users] Split polygon by line

2018-10-18 Thread Komяpa
Hi, ST_Dump returns geometry_dump object that consists of two fields. To get geometry from it: (ST_Dump(whatever)).geom as geom чт, 18 окт. 2018 г. в 19:46, Shane Carey : > Hi, > > I still dont get any GIS layers returning, when I do: > > SELECT ST_Dump(ST_Split(polygon.geom, line.geom)) > IN

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Shane Carey
Hi, I still dont get any GIS layers returning, when I do: SELECT ST_Dump(ST_Split(polygon.geom, line.geom)) INTO clip1 FROM testclip line, floodplainw polygon; Thanks Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* On Thu, Oct 18, 2018 at 6:00 PM Shane Carey wrote: > O

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Sandro Santilli
On Thu, Oct 18, 2018 at 04:38:53PM +0200, Sandro Santilli wrote: > I guess QGIS wants to know the exact geometry type of the layer, > which you could specify with a cast: > > SELECT ST_Split(circle, line)::geometry(polygon) Sorry, I was too quick at answering. ST_Split returns a GEOMETRYCOLL

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Shane Carey
Ok so! :) Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* On Thu, Oct 18, 2018 at 3:45 PM Arnaud L. wrote: > Le 18/10/2018 à 18:55, Shane Carey a écrit : > > Ok thanks, will do in future: > > Dont' wait, do it now ! ;) > > > This is what I have tried and no joy- any ideas? T

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Birgit Laggner
git Von: "Shane Carey" An: "arnaud listes" CC: postgis-users@lists.osgeo.org Gesendet: Donnerstag, 18. Oktober 2018 18:55:44 Betreff: Re: [postgis-users] Split polygon by line Ok thanks, will do in future: This is what I have tried and no joy- any ideas? Thanks

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Arnaud L.
Le 18/10/2018 à 18:55, Shane Carey a écrit : Ok thanks, will do in future: Dont' wait, do it now ! ;) This is what I have tried and no joy- any ideas? Thanks in advance. SELECT ST_AsText((ST_Dump(ST_Split(circle, line))).geom) As wkt Don't make a WKT representation. WKT is a text string, no

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Shane Carey
Ok thanks, will do in future: This is what I have tried and no joy- any ideas? Thanks in advance. SELECT ST_AsText((ST_Dump(ST_Split(circle, line))).geom) As wkt INTO layerq FROM (SELECT ST_MakeLine(ST_MakePoint(10, 10),ST_MakePoint(190, 190)) As line, ST_Buffer(ST_GeomFromText('POINT(100

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Sandro Santilli
On Thu, Oct 18, 2018 at 05:43:07PM +0100, Shane Carey wrote: > SELECT ST_Split(circle, line) > INTO qlayer > FROM (SELECT > ST_MakeLine(ST_MakePoint(10, 10),ST_MakePoint(190, 190)) As line, > ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50) As circle) As foo; > > But this layer does not sh

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Arnaud L.
Le 18/10/2018 à 18:43, Shane Carey a écrit : Yep, I run the following: SELECT ST_Split(circle, line) INTO qlayer FROM (SELECT     ST_MakeLine(ST_MakePoint(10, 10),ST_MakePoint(190, 190)) As line,     ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50) As circle) As foo; But this layer does not sh

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Shane Carey
Hi, Yep, I run the following: SELECT ST_Split(circle, line) INTO qlayer FROM (SELECT ST_MakeLine(ST_MakePoint(10, 10),ST_MakePoint(190, 190)) As line, ST_Buffer(ST_GeomFromText('POINT(100 90)'), 50) As circle) As foo; But this layer does not show up as a gis layer in qgis? Thanks in adv

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Arnaud L.
Le 18/10/2018 à 18:31, Shane Carey a écrit : This works and runs but how do I make a polygon out of it as opposed to it just being in a table - I'd like it as individual polygons. It doesn't have to be in a table. The second polygon example in the doc builds two individual polygons from one po

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Shane Carey
Hi, This works and runs but how do I make a polygon out of it as opposed to it just being in a table - I'd like it as individual polygons. Thanks Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* On Thu, Oct 18, 2018 at 7:50 AM Arnaud L. wrote: > Le 18/10/2018 à 00:04, Shane

Re: [postgis-users] Split polygon by line

2018-10-18 Thread Arnaud L.
Le 18/10/2018 à 00:04, Shane Carey a écrit : Is there a way to split the polygon into multiple polygons by these multiple lines? Starting from PostGIS 2.5.0, you can split a polygon by a multiline with ST_Split. With an earlier version you'll have to split the polygon multiple times. https:/

Re: [postgis-users] Split polygon by line

2018-10-17 Thread Shane Carey
Thanks Arnaud - thats great. Cheers Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* On Thu, Oct 18, 2018 at 7:50 AM Arnaud L. wrote: > Le 18/10/2018 à 00:04, Shane Carey a écrit : > > Is there a way to split the polygon into multiple polygons by these > > multiple lines? > >

Re: [postgis-users] Split polygon by line

2018-10-17 Thread Simon Greener
Split poly by line? Yes. ⁣Sent from Blue ​ On Oct 18, 2018, 09:05, at 09:05, Shane Carey wrote: >Hi there, > >I have multiple lines that intersect a polygon layer. > >Is there a way to split the polygon into multiple polygons by these >multiple lines? > >Postgis is really really awesome. So powe

[postgis-users] Split polygon by line

2018-10-17 Thread Shane Carey
Hi there, I have multiple lines that intersect a polygon layer. Is there a way to split the polygon into multiple polygons by these multiple lines? Postgis is really really awesome. So powerful. Thanks in advance -- Le gach dea ghui, *Shane Carey* *GIS and Data Solutions Consultant* __