You are not logged in.

#1 2018-02-20 13:03:15

emga
Member
Registered: 2014-05-21
Posts: 311

[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.

Offline

#2 2018-02-20 19:54:20

alester
Member
Registered: 2011-09-21
Posts: 295

Re: [JOSM] Autocomplete Polygon

emga wrote:

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.

Offline

#3 2018-02-20 23:53:41

emga
Member
Registered: 2014-05-21
Posts: 311

Re: [JOSM] Autocomplete Polygon

alester wrote:
emga wrote:

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...

Offline

#4 2018-02-21 09:00:04

escada
Moderator
Registered: 2011-08-13
Posts: 1,753

Re: [JOSM] Autocomplete Polygon

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

Offline

#5 2018-02-21 09:05:11

emga
Member
Registered: 2014-05-21
Posts: 311

Re: [JOSM] Autocomplete Polygon

escada wrote:

is that small field part of the big field on the right at the moment ?
if so, select those 2 points, press alt-X (on Mac).

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.

Offline

#6 2018-02-22 00:42:11

alester
Member
Registered: 2011-09-21
Posts: 295

Re: [JOSM] Autocomplete Polygon

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.

Offline

#7 2018-02-22 09:05:36

emga
Member
Registered: 2014-05-21
Posts: 311

Re: [JOSM] Autocomplete Polygon

alester wrote:

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?

Yes

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?

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.

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).

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).

Personally, I would vote against such a function.

This is also what the devs say, i accept that and said goodbye to my wish ;-)
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

Offline

#8 2018-02-22 19:02:43

alester
Member
Registered: 2011-09-21
Posts: 295

Re: [JOSM] Autocomplete Polygon

emga wrote:

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).

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.

Offline

#9 2018-02-22 19:23:29

emga
Member
Registered: 2014-05-21
Posts: 311

Re: [JOSM] Autocomplete Polygon

alester wrote:
emga wrote:

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).

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?

Offline

#10 2018-02-22 19:37:17

n76
Member
Registered: 2013-05-22
Posts: 309

Re: [JOSM] Autocomplete Polygon

emga wrote:

. . .
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

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.

Offline

#11 2018-02-22 19:58:52

emga
Member
Registered: 2014-05-21
Posts: 311

Re: [JOSM] Autocomplete Polygon

n76 wrote:
emga wrote:

. . .
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

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.

Offline

#12 2018-02-22 20:41:48

escada
Moderator
Registered: 2011-08-13
Posts: 1,753

Re: [JOSM] Autocomplete Polygon

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/JOS … Alt.2BX.29 for more info on other useful operations offered by utilsplugin2

Offline

#13 2018-02-22 22:16:49

emga
Member
Registered: 2014-05-21
Posts: 311

Re: [JOSM] Autocomplete Polygon

escada wrote:

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/JOS … Alt.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 !

Last edited by emga (2018-02-22 22:26:40)

Offline

#14 2022-04-25 17:48:55

arcturusss
New Member
Registered: 2020-07-01
Posts: 2

Re: [JOSM] Autocomplete Polygon

escada wrote:

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/JOS … Alt.2BX.29 for more info on other useful operations offered by utilsplugin2

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.

Offline

Board footer

Powered by FluxBB