Modify

Opened 3 years ago

Closed 3 weeks ago

#14228 closed enhancement (fixed)

[RFC Patch] Order the members when creating boundaries and multipolygons

Reported by: naoliv Owned by: team
Priority: normal Milestone: 20.06
Component: Core Version:
Keywords: relation, member, order, multipolygon Cc:

Description

Open the example file, select the green vertical (tagged) ways and then the other 2 ways.

Go to Presets → Relations → Boundary

https://i.imgur.com/jQeKtix.png
Here there is one small issue, I think: I never saw the Apply Preset enabled.
Should this button be removed from the dialog?

Just press New relation then and see how the members are unordered:
https://i.imgur.com/mcuHebs.png

Could JOSM create boundary relations with the ordered members, please?
It seems to also apply if we use Presets → Relations → Multipolygon

JOSM:

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-01-10 23:13:30 +0100 (Tue, 10 Jan 2017)
Build-Date:2017-01-11 02:32:17
Revision:11450
Relative:URL: ^/trunk

Identification: JOSM/1.5 (11450 pt_BR) Linux Debian GNU/Linux testing (stretch)
Memory Usage: 445 MB / 10206 MB (168 MB allocated, but free)
Java version: 1.8.0_111-8u111-b14-3-b14, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1600x900, :0.1 1280x1024
Maximum Screen Size: 1600x1024
Java package: openjdk-8-jre:amd64-8u111-b14-3
Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13
VM arguments: [-Dawt.useSystemAAFontSettings=on]
Dataset consistency test: No problems found

Attachments (3)

example.osm (995 bytes) - added by naoliv 3 years ago.
14228.patch (3.8 KB) - added by GerdP 13 months ago.
14228-v2.patch (3.8 KB) - added by GerdP 13 months ago.
don't add tag from outer way(s) to relation

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by naoliv

Attachment: example.osm added

comment:1 Changed 3 years ago by Don-vip

Keywords: relation member order added

comment:2 Changed 3 years ago by stoecker

"Apply preset" should be activated when you selected one(?) relation instead of future relation members.

comment:3 Changed 23 months ago by Don-vip

Keywords: multipolygon added

Changed 13 months ago by GerdP

Attachment: 14228.patch added

Changed 13 months ago by GerdP

Attachment: 14228-v2.patch added

don't add tag from outer way(s) to relation

comment:4 Changed 13 months ago by GerdP

Summary: Order the members when creating boundaries and multipolygons[RFC Patch] Order the members when creating boundaries and multipolygons

I think best is to use CreateMultipolygonAction (Ctrl+B) to calculate the multipolygon/boundary relation based on the selected ways.
The attached patch implements this.

  • Members are sorted by connectivity
  • When the selected ways build a valid multipolygon use the calculated roles
  • If the selected ways do not build a valid multipolygon user will see a popup message and roles are empty

Open problem with the first patch: Assume you draw a way inside a closed way tagged as building and select those two ways.
When you press Ctrl+B to build the multipolyon the building tag is moved to the relation (and removed from the way)
When you apply the preset multipolygon the building tag is also added to the multipolygon but it is not removed from the outer way, thus producing more or less invalid data.

So with v2 the building tag is not added to the relation.
I prefer v2.

Last edited 13 months ago by GerdP (previous) (diff)

comment:5 Changed 3 months ago by skyper

Was the second patch overseen or are there reasons for not applying it?

comment:6 Changed 4 weeks ago by simon04

Milestone: 20.06

comment:7 Changed 3 weeks ago by GerdP

Resolution: fixed
Status: newclosed

In 16585/josm:

fix #14228: Order the members when creating boundaries and multipolygons

  • Members are sorted by connectivity
  • When the selected ways build a valid multipolygon use the calculated roles
  • If the selected ways do not build a valid multipolygon user will see a popup message and roles are empty

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.