[postgis-users] Split polygon by line

Shane Carey careyshan at gmail.com
Thu Oct 18 09:55:44 PDT 2018


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 90)'), 50) As circle) As foo;
select populate_geometry_columns();

Le gach dea ghui,
*Shane Carey*
*GIS and Data Solutions Consultant*


On Thu, Oct 18, 2018 at 3:38 PM Arnaud L. <arnaud.listes at codata.eu> wrote:

> 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 show up as a gis layer in qgis?
>
> Probably because the geometry_columns table is not populated.
> Try to either create the destination table first and then to insert in
> it, or maybe just run :
> SELECT Populate_Geometry_Columns();
>
> > Thanks in advance for your help. Sorry, what do you mean by top post?
>
> https://en.wikipedia.org/wiki/Posting_style
> Bottom or interleaved posting are the preferred style.
>
> --
> Arnaud
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20181018/b8b115ab/attachment.html>


More information about the postgis-users mailing list