You are not logged in.

#1 2020-01-03 09:40:09

Andreas König
Member
Registered: 2015-09-20
Posts: 11

JOSM : tool to auto-generate areas out of surrounding lines?

I generate lots of landuse polygons.
Landuse polygons normally are surrounded by a complete closed set of lines (e.g. highways, paths, other polygons...)

Is there any JOSM plugin to automatically generate a new polygon inside such a set of lines by duplicating and connecting all surrounding nodes with minimum permissible distance (to prevent "double point use")?

Tx. Andreas

Offline

#2 2020-01-03 12:44:30

GerdP
Member
Registered: 2015-12-18
Posts: 1,140

Re: JOSM : tool to auto-generate areas out of surrounding lines?

I don't know any such tool. I'd use these steps:
1) select the ways
2) enable parallel mode (Shift+P) and create copy
3) remove tags of the parralel copy
4) either combine the ways with C or create a multipolygon with Ctrl+B
5) check that the geomatry matches the area
6) add tags

Last edited by GerdP (2020-01-03 12:45:15)

Offline

#3 2020-01-03 15:58:26

Andreas König
Member
Registered: 2015-09-20
Posts: 11

Re: JOSM : tool to auto-generate areas out of surrounding lines?

sorry, but this will not do the task...
- the surrounding lines are normally much longer than the short pieces limiting the land area to be filled. For example if you wnat to generate a "farmland" area anjacent to a forrresst, the forest is often alare large multipolygon --> coppying copies the whole objects
- after cropping, the resulting polygon ist same size as the source lines. To fill in an area however, the polygon should be smaller. So you must adjust many points manualy
--> So the overall the time needed and error probability ist heighter than in manually creating athe polygon, possibly using a copy of only one side line with especially many points

Offline

#4 2020-01-03 16:34:57

GerdP
Member
Registered: 2015-12-18
Posts: 1,140

Re: JOSM : tool to auto-generate areas out of surrounding lines?

Andreas König wrote:

- after cropping, the resulting polygon ist same size as the source lines. To fill in an area however, the polygon should be smaller. So you must adjust many points manualy

The parallel mode makes this easy. When you drag a set of lines they are automatically scaled.

Offline

#5 2020-01-03 21:19:26

Andreas König
Member
Registered: 2015-09-20
Posts: 11

Re: JOSM : tool to auto-generate areas out of surrounding lines?

I tried again, ans succeeded now:
There was a important hint missing: the parallel mode /scaling relative to polygon center works only with "simple, unbranched" polygons, so you must copy, crop and combine first, only then scaling works....

It is not the "semiautomatic" solution I imagine, but in some cases useful, I will try it out

Thanks Andreas

Offline

#6 2020-01-04 11:11:23

Andreas König
Member
Registered: 2015-09-20
Posts: 11

Re: JOSM : tool to auto-generate areas out of surrounding lines?

tried some times, but time effort is always higher than creating polygon manually, so no real improvement

Offline

#7 2020-01-04 11:44:38

GerdP
Member
Registered: 2015-12-18
Posts: 1,140

Re: JOSM : tool to auto-generate areas out of surrounding lines?

And do you still think that a plugin could improve the work flow?

Offline

#8 2020-01-04 18:24:24

Andreas König
Member
Registered: 2015-09-20
Posts: 11

Re: JOSM : tool to auto-generate areas out of surrounding lines?

I think so, because generating such polygons is a everyday task for generating landuse polygons.
If there is no exuisting solution, i might post as suggestion for such tool.
I the end, it is "not much more" than the "flood fill" tool of pixel graphixs programs.

* from a point klicked, determine all surrounding line/polygon segments --> if line is not closed, abort
* determine all points conteining to this lines
* connect and copy all this points
* determine centre oft resulting polygon
* change position of each point relatively to polygon center for distance x = scale area as in parallel mode
* display polygo for further editing

I know, the problems arise in detail work, e.g. what if center of area lies outside of area in case of partly concave polygons....
I think it would accelerate creating landuse polygons a lot....

Offline

Board footer

Powered by FluxBB