#14566 closed enhancement (fixed)
Prevent user from selecting the same layer for Subject and Reference
Reported by: | bagage | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin conflation | Version: | latest |
Keywords: | Cc: | Tyndare |
Description (last modified by )
When using the same layer for both Subject and Reference, Conflation computes things a bit oddly - when you would expect everything to match with 0m of distance and score of 1, it actually ends up with strange results.
I believe it does not make sense to use the same layers for both entries in anycase, so here's a small patch preventing it.
Additional information below.
Build-Date:2017-03-24 10:36:25 Revision:11772 Is-Local-Build:true Identification: JOSM/1.5 (11772 SVN en) Linux Debian GNU/Linux 9.0 (stretch) Memory Usage: 829 MB / 1760 MB (611 MB allocated, but free) Java version: 1.8.0_121-8u121-b13-4-b13, Oracle Corporation, OpenJDK 64-Bit Server VM Screen: :0.0 1920x1080 Maximum Screen Size: 1920x1080 Java package: openjdk-8-jre:amd64-8u121-b13-4 Java ATK Wrapper package: libatk-wrapper-java:all-0.33.3-13 Program arguments: [${HOME}/CL096-CLERIEUX/test-small.osm] Dataset consistency test: No problems found Plugins: + PicLayer (33148) + conflation (0.5.1) + jts (32699) + rex (26) + utilsplugin2 (33182) Last errors/warnings: - W: No configuration settings found. Using hardcoded default values for all pools.
Attachments (1)
Change History (7)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
Cc: | added |
---|
comment:3 by , 8 years ago
comment:4 by , 8 years ago
OK, so this non-match is on purpose (IdenticalFeatureFilter being responsible of it). Indeed, I'll adapt the patch to only show a warning if the same items are selected for both layers then.
comment:5 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks !
To propose patches for this plugin you can also make pull request to github if you prefer.
https://github.com/JOSM/conflation/commit/f19a755ad53087543b9410364fa5fd51b3c0823d
comment:6 by , 8 years ago
Finally I agree with you, IdenticalFilter really gives strange results, and it seems it only compare geometry, not object identity, so it excludes matching different objects if they have the exact same geometry, that's not good. I've deactivated it by default, it is still available in advanced mode.
https://github.com/JOSM/conflation/commit/1201e2dc746bda4f5c99fd7d3ff10ab1addec717
Actually there could be some use cases that need to use the same layer, like the one exposed in this ticket: #7616
Maybe using the same layer AND the same items could be more suspicious, but the implementation made by Josh Doe is explicitly protected for this situation by using an "Indentical" filter that will exclude matching an item with itself.
So it is more a feature than a bug ;-) I agree with you that it give strange results though.
I don't see the use case for trying to match items with themselves, if there is we should maybe make the "Identical" filter optional.
But I don't think we should prevent users from doing this, maybe if you could modify your patch to just raise a warning if both same layers and same items are frozen as reference and subject.