#14374 closed enhancement (fixed)
[PATCH] TagConflictResolutionUtil : automatic tag conflict resolution
Reported by: | Tyndare | Owned by: | Don-vip |
---|---|---|---|
Priority: | major | Milestone: | 17.02 |
Component: | Core | Version: | |
Keywords: | tag conflict resolution tiger cadastre france canada import | Cc: |
Description
Hi,
I'm trying to see how to update buildings data in France that has been imported from the "cadastre".
We have the authorization to import data from the French cadastre if the "source" tag mention the year.
This lead to tag conflicts whenever we try to merge or update building geometry, as the year of newly imported data is different.
I think this particular conflict should be resolved automatically, by choosing the source tag with the most recent year.
I looked at the class TagConflictResolutionUtil.java
and there was already an automatic resolution implemented for "tiger:*" tags in the US.
I imagine TIGER or French cadastre are not the only conflict cases that could be automated so I tried to make something a little generic.
I defined two kinds of automatic resolution preference:
- automatic-tag-conflict-resolution.combine: where the values are automatically combined with a separator, like it was done for Tiger.
- automatic-tag-conflict-resolution.choice: where the best value from a group is automatically selected.
I'm not used to JOSM code, so don't hesitate to tell me if my code is not structured correctly.
It's not visible in the patch but I also deleted the file
TigerUtils.java
which is no longer necessary.
If this patch is accepted I may try to make also a preference editor dialogue to allow users to add new entries.
Regards,
Tyndare.
Attachments (6)
Change History (17)
by , 8 years ago
Attachment: | applyAutomaticTagConflictResolution.diff added |
---|
comment:1 by , 8 years ago
This looks great! Some remarks:
1) Are you used to JUnit tests? This would be useful to add unit tests for this new feature.
2) All public/protected methods should have Javadoc
3) Please don't add labels such as keyLoop:
4) You can enable Checkstyle in your IDE to meet code rules (whitespaces, etc.)
by , 8 years ago
Attachment: | applyAutomaticTagConflictResolution-updated.diff added |
---|
PATCH (updated)
comment:2 by , 8 years ago
Thanks a lot for your feedback and valuables comments.
Please find attached an updated version which includes the modifications you suggested:
applyAutomaticTagConflictResolution-updated.diff
comment:3 by , 8 years ago
Keywords: | france added |
---|---|
Milestone: | → 17.02 |
Owner: | changed from | to
Status: | new → assigned |
This looks very nice, I'll give it a try soon :)
comment:4 by , 8 years ago
Keywords: | canada import added |
---|
The patch is awesome. I'm adding CanVec too :)
comment:5 by , 8 years ago
Priority: | normal → major |
---|
by , 8 years ago
Attachment: | canvec.png added |
---|
by , 8 years ago
Attachment: | cadastre.png added |
---|
comment:7 by , 8 years ago
2010 was a mess, 5 different formats... I'm reworking the regex to match all existing values.
comment:10 by , 8 years ago
Someone please also add a short end user documentation about the new features at Help/Concepts/Conflict or Help/Dialog/Conflict
PATCH