2

I would like to merge overlapping buffers created in PostGIS and have as many polygons as there are not overlapping merged buffers, that can be viewed in QGIS. The answer of Creating dissolved buffers in QGIS using PostGIS seems to be on the right path, but I do not understand what g is in the query:

CREATE VIEW buffer40units AS 

SELECT 
   g.path[1] as gid, 
   g.geom::geometry(Polygon, 31492) as geom 

FROM
   (SELECT 
     (ST_Dump(ST_UNION(ST_Buffer(geom, 40)))).* 
   FROM point
) as g;
1
  • By merge you mean union/dissolve? Can you add a screenshot?
    – BERA
    Feb 12, 2022 at 13:40

1 Answer 1

3

g refers to the sub-query:

(SELECT 
     (ST_Dump(ST_UNION(ST_Buffer(geom, 40)))).* 
   FROM point
)

point in that is the input layer, that is being buffered.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.