[JOSM] Autocomplete Polygon

Is there a way to autocomplete a polygon if there is no other logical way?

See example picture, and marked area with black arrow. the black line represent where i would like to close this little field and JOSM finishes the polygon, instead of me drawing the polygon around the existing line.
(I know the picture is taken in iD, its just an example picture!)

https://imgur.com/a/MQVnp

Yes im familiar with Follow Line command, but this still is slow, and makes no sense and is very labour intensiv.

I’ve never found it to be slow or labour intensive. Holding the L key has always been fast and easy for me.

The same thing i got as an answer on my feature request at JOSM, but this is no valid answer or reason. They said “no reason similar feature is built in” which is hilarious, because its not.
its the same like saying we can already click to draw a line we need no further function.

FUN FACT: ALL major GIS Programs have this function built in, and it makes sense to only draw one boarder line(The “free” side) instead of following the hole thing around.

BTW I need to press the button for each point on the line, holding down does not work for me, dont know if it is the mac version or my keyboard or whatever.

Its just sad that this function will not be implemented in JOSM, Reason: There is a more complicated one already built in…

Just select those 2 points, press alt-X (on Mac).
Perhaps you need utilsPlugin2 for this

At the moment the fields are not mapped at all, its empty area.

My question comes from the idea that you only draw the ONE “free” boarder and JOSM closes the polygon automatically, like ArcGIS/QGis draw the free boarder, tell the program what is the new inside part,boom, polygon done.

Okay, maybe I’m just not understanding what it is you’re wanting it to do. Are you saying you want to draw a way where you have the black line drawn in your image, and the software should automatically perform the “follow” around the existing way to the left to create a closed way? I’m not even sure how this could be done. How would it know which side you wanted it to do this on? There are two ways it could do this: it could create either a small field to the left, or a large field to the right. How is it supposed to decide which direction to go?

Even if an algorithm could be worked out, I suspect this would lead to too many unwanted areas. There are many times in which you may only want the way where you’ve drawn, and having it automatically creating a closed way would be undesirable. In other cases, a multipolygon may work better than a closed way (like in your example).

Personally, I would vote against such a function.

Yes

You could tell the program, eg the side which get filled is the side you click in, if i click on teh left side the little left area will be filled, if i click on the right side the big right one will be filled.

Of course it only makes sense when you want to have an area, but for an multipolygon i have to follow the hole outline (by hand or with the follow command).

This is also what the devs say, i accept that and said goodbye to my wish :wink:
But maybe this video will help understand the practically of my desire, its a bit of an different approach but does the same thing at end.

https://youtu.be/ASviagXGWTM?t=2m18s

No, if I wanted to make a multipolygon, I would only want to draw a way across the spot in your image, split the way to the left, and create a multipolygon relation from those two ways.

I dont understand but will do some research on this, is this faster on large areas? Do I have to draw just the closing line?

That is an interesting way of adding a new polygon area nestled into (sharing boundaries with) existing polygons. I can see where that could make some types of editing (landcover, land use, etc.) much easier. It would be nice if JOSM had something similar.

Thank you finally somebody who understands me;-)

yeah especially at landuse its very useful, in my region we have a lot of forest already mapped but the meadow in between is missing, so it would help a lot, to map faster than with follow command.

You probably haven’t read my edit. Just select those 2 points at the end of your black line and press alt-X. There was no need for the right hand side (my mistake). This will create the separate area, as you wanted.

See https://wiki.openstreetmap.org/wiki/JOSM/Plugins/utilsplugin2#Split_area_.28Alt.2BX.29 for more info on other useful operations offered by utilsplugin2

Indeed! Sorry, i just tried it, and it helps! Thank you for pointing this out!

EDIT: Okey it works kinda, but i think i need to train a bit more, or use it correct, somehow it messes up a bit. But thanks !

Well, it works only if you already have one enclosed area. And even in example from first post, when this command indeed creates new polygon as required, it modifies existing polygon. So, in general case it’s not an option.

I’m currently trying indoor mapping, and it’s huge pain to add corridors when you already have drawn isolated rooms. Basically you need to click about 50-100 existing points to create new polygon - but if area is already enclosed with other ways, it should be perfectly possible to create polygon automatically in one click.