Modify

Opened 8 years ago

Closed 4 years 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 8 years ago.
14228.patch (3.8 KB ) - added by GerdP 5 years ago.
14228-v2.patch (3.8 KB ) - added by GerdP 5 years ago.
don't add tag from outer way(s) to relation

Download all attachments as: .zip

Change History (10)

by naoliv, 8 years ago

Attachment: example.osm added

comment:1 by Don-vip, 8 years ago

Keywords: relation member order added

comment:2 by stoecker, 8 years ago

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

comment:3 by Don-vip, 6 years ago

Keywords: multipolygon added

by GerdP, 5 years ago

Attachment: 14228.patch added

by GerdP, 5 years ago

Attachment: 14228-v2.patch added

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

comment:4 by GerdP, 5 years ago

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 5 years ago by GerdP (previous) (diff)

comment:5 by skyper, 5 years ago

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

comment:6 by simon04, 4 years ago

Milestone: 20.06

comment:7 by GerdP, 4 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.