Opened 9 years ago
Closed 6 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

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:

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)
Change History (10)
by , 9 years ago
| Attachment: | example.osm added |
|---|
comment:1 by , 9 years ago
| Keywords: | relation member order added |
|---|
comment:2 by , 9 years ago
comment:3 by , 7 years ago
| Keywords: | multipolygon added |
|---|
by , 7 years ago
| Attachment: | 14228.patch added |
|---|
comment:4 by , 7 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.
comment:6 by , 6 years ago
| Milestone: | → 20.06 |
|---|



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