[postgis-users] Split polygon by line

Sandro Santilli strk at kbt.io
Thu Oct 18 07:38:53 PDT 2018


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 show up as a gis layer in qgis?

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, what do you mean by top post?

See https://en.wikipedia.org/wiki/Posting_style#Top-posting

--strk;


More information about the postgis-users mailing list