Modify

Opened 5 years ago

Closed 5 years ago

#17767 closed defect (fixed)

Action "Update multipolygon" may change route relation to multipolygon

Reported by: GerdP Owned by: GerdP
Priority: normal Milestone: 19.05
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by GerdP)

What steps will reproduce the problem?

  1. load attached file
  2. Select way with id 189944949 (amenity=parking)
  3. Look at entry Tools -> Update multipolygon (Ctrl+Shift+B)

What is the expected result?

The entry for the action should be disabled

What happens instead?

The entry is enabled and clicking it will download missing members of the route relation and finally change the route relation to an invalid multipolygon.

Please provide any additional information below. Attach a screenshot if possible.

If the selected ways were only referred by one multipolygon relation but also by another relation (maybe a route or site relation) the action is wrongly disabled.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-04-28 04:36:41 +0200 (Sun, 28 Apr 2019)
Build-Date:2019-04-28 02:37:58
Revision:15031
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15031 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 704 MB / 1820 MB (262 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-XX:StartFlightRecording=name=MyRecording2,settings=d:\dbg\gerd.jfc, -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=e:\ld\perf_20190529_074852.jfr]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (34977)
+ apache-commons (34908)
+ buildings_tools (34982)
+ continuosDownload (82)
+ ejml (34908)
+ geotools (34908)
+ jaxb (35014)
+ jts (34908)
+ o5m (34908)
+ opendata (34997)
+ pbf (34908)
+ poly (34991)
+ reverter (34999)
+ undelete (34977)
+ utilsplugin2 (34977)

Validator rules:
+ c:\josm\core\data\validator\geometry.mapcss

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (1)

upd-mp-issues.osm.bz2 (4.8 KB ) - added by GerdP 5 years ago.

Download all attachments as: .zip

Change History (7)

by GerdP, 5 years ago

Attachment: upd-mp-issues.osm.bz2 added

comment:1 by GerdP, 5 years ago

Milestone: 19.05
Owner: changed from team to GerdP
Status: newassigned

comment:2 by GerdP, 5 years ago

Resolution: fixed
Status: assignedclosed

In 15137/josm:

fix #17767: "Update multipolygon" may change route relation to multipolygon
If no relation is selected but at least one way: Collect the multipolygon relations which have the selected way(s) as members. If the collection contains exactly one relation the action is enabled.
The implementation stops early when more than one multipolygon relation is found.

comment:3 by GerdP, 5 years ago

Description: modified (diff)

comment:4 by GerdP, 5 years ago

In 15141/josm:

see #17767 and #17768: add non regression unit tests
Test testTicket17768() fails with current code and is ignored for now.

comment:5 by GerdP, 5 years ago

Resolution: fixed
Status: closedreopened

I just found out that this is quite complex. The updateEnabled() method may set the status to enabled but actionPerformed() should verify that this is still correct.
The undoredo handler can change the referrers of a way and when that happens getSelectedMultipolygonRelation() might return null.
Another problem is the OsmPrimitive.getReferrers() method itself. It will return filtered elements. I did not yet find out which flags I have to check...

comment:6 by GerdP, 5 years ago

Resolution: fixed
Status: reopenedclosed

In 15143/josm:

fix #17767 (again)

  • make sure that we don't create multipolygon in update mode
  • ignore filtered relations when only ways are selected

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
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.