# Enlargement in one dimension to bigger polygon

I have areas (polygon) in the streets (polygons).

I want to enlagre the parallel segment to an other polygon to touch it. And so creating this new polygons.

There is a lot of new alogithms in field calculator. Maybe processing alorithms could be a solution or Python or GRASS. I don't know which way to choose.

At this time, i try this way :

1. Cut areas by street polygons
2. Join attributes by location to grab street polygon id in the area
3. Polygon to lines
4. Explode lines
5. Maybe ** IF segment is < 0-45 degrees THEN segment is extended to road polygons ( exploded too ?)**

Polygons to lines

• The green polygons are always longer in the direction of the streets than they are wide? That way we can know in which direction to enlarge them. Have you tried v.centerline to convert green areas to lines, then v.buffer with flat end caps and then clip the results with dissolved street polygons?
– BERA
Oct 13, 2017 at 8:17
• No they are not always longer in the direction of the streets than they are wide. Not yet tried. goood idea. i try Oct 13, 2017 at 8:20
• Ok. Then it might work better if you dissolve the roads, v.centerline them, clip the centerlines with the green areas and then v.buffer these centerlines (instead of the green area centerlines) with flat end cap and then clip the buffers with road polygons
– BERA
Oct 13, 2017 at 8:36

2) If you have rectangular polygons, then run in pgAdmin a query for two opposite points belonging to the polygon: ``` create table exper_poi1 as SELECT ST_ClosestPoint (my_line_exper.geom, exper_poi.geom) FROM my_line_exper, exper_poi WHERE exper_poi.gid = 1; ``` and combine them into one layer (table), for example exper_poi_all. (in my experiment there are 4 such points, and not 2, since I do not have a rectangular polygon), the result is shown in Figure 3;