Modify

Opened 4 years ago

Closed 9 months ago

Last modified 9 months ago

#20424 closed defect (fixed)

Duplicate relations not detected with incomplete members

Reported by: skyper Owned by: GerdP
Priority: normal Milestone: 24.02
Component: Core validator Version: latest
Keywords: template_report duplicate relations Cc:

Description

What steps will reproduce the problem?

  1. Have a relation without members downloaded
  2. Duplicate relation and click on ok in relation editor
  3. Run Validator

What is the expected result?

Error: Duplicated relations

What happens instead?

No error

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

It does only work if the members are downloaded.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-01-22 10:21:26 +0100 (Fri, 22 Jan 2021)
Revision:17475
Build-Date:2021-01-23 02:30:52
URL:https://josm.openstreetmap.de/svn/trunk

Attachments (1)

20424.patch (3.6 KB ) - added by GerdP 4 years ago.
simple approach which may produce duplicate error messages

Download all attachments as: .zip

Change History (8)

comment:1 by GerdP, 4 years ago

Yes, the algo doesn't just compare members, it calculates and compares the geometry of relations. Without members in cannot do that. I also expected a simple member list compare, but the algo is more complex. Your case could be added, though.

by GerdP, 4 years ago

Attachment: 20424.patch added

simple approach which may produce duplicate error messages

comment:2 by GerdP, 4 years ago

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

The attached patch works for your case but doesn't pass the unit tests and produces duplocate error messages for complete relations, so it's not such a simple change.

comment:3 by GerdP, 4 years ago

see also #20425

comment:4 by stoecker, 4 years ago

Milestone: 21.0221.03

Milestone renamed

comment:5 by Don-vip, 4 years ago

Milestone: 21.03

comment:6 by GerdP, 9 months ago

Resolution: fixed
Status: assignedclosed

In 18976/josm:

fix #20424, fix #20425: Duplicate relations not detected with incomplete members, Duplicate Relation test is too lazy/too aggressive

  • add code to compare just members so that it doesn't matter if they are complete
  • change original test which compares geometry to use a list instead of a set to store members. That means that the order of members is taken into account as well as duplicated members
  • before comparing tags only the "discardable" tag keys are removed, previously all "uninteresting" keys were removed, so fixme=* or note=* was ignored
  • if two relations have the same members in the same order but different tags the new message informational message "Identical members" is produced.

comment:7 by GerdP, 9 months ago

Milestone: 24.02

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.