-1

Having familiarized with an similar question specified on the link Dividing a buffer into segments based on path and distance, the author asked an analogous question whether it is possible to solve this problem using PostGIS. The essence of the issue is shown in the figure 1 and

enter image description here

figure 2

enter image description here

Method is a SQL script, using Clip overlapping polygon in equal sharing size, author for which part of its implementation.

  • 4
    Your question doesn't have a question. – Vince Jan 18 '19 at 0:50
  • 1
    So your Answers aren't answers and the Q and two As are just one big code-this-for-me request? I can't vote to reopen that. – Vince Jan 18 '19 at 11:01
  • 1
    Cyril you should only have 1 question and 1 correct answer (you can answer your own question but you seem to be treating GIS>SE as thread based tool - it is not is a question with one correct answer tool) – Mapperz Jan 18 '19 at 15:05
1
  1. Create lines of approximately equal length from lines, the line must be ordered;
  2. Run the script:
WITH
tblb AS (SELECT id, ST_Buffer ((geom), 0.0001,'endcap=round join=round') as geom FROM <name_table>),
tblc_l AS (SELECT a.id, ST_LineMerge(ST_Difference(ST_ExteriorRing(a.geom), b.geom)) geom FROM tblb a LEFT JOIN tblb b ON (ST_Intersects(a.geom, b.geom) AND a.id < b.id)),
tblcpoly_l AS (SELECT id, ST_MakePolygon(ST_AddPoint(geom, ST_StartPoint(geom))) geom FROM tblc_l),
tbld_r AS (SELECT a.id, ST_LineMerge(ST_Difference(ST_ExteriorRing(a.geom), b.geom)) geom FROM tblb a LEFT JOIN tblb b ON (ST_Intersects(a.geom, b.geom) AND a.id > b.id)),
tbldpoly_r AS (SELECT id, ST_MakePolygon(ST_AddPoint(geom, ST_StartPoint(geom))) geom FROM tbld_r)
SELECT ST_Intersection(a.geom, b.geom) as geom FROM tblcpoly_l a, tbldpoly_r b
WHERE ST_Intersects (a.geom, b.geom) AND a.id=b.id;
  1. See the picture

enter image description here

Good luck to everyone :-),

Original solutions ...

This script is called - ST_BambooBuffer...

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