Opened 9 years ago
Last modified 3 months ago
#11175 needinfo defect
[Patch] "Ways with same position" gives errors that are not
Reported by: | Sylves | Owned by: | Sylves |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | |
Keywords: | barrier duplicate way | Cc: | Woazboat |
Description (last modified by )
Hi,
JOSM Validator gives me an error when I tag the border of a amenity=courthouse (also with landuse=* and other tags imo) with a complete way tagged barrier=fence. If I follow this https://help.openstreetmap.org/questions/38273/how-to-map-barriers-like-fences-on-landuse-borders, it is the right way to tag it. Here is a picture:
Why is it considered as an error? For me it is not.
Regards,
Sylves
Attachments (2)
Change History (9)
by , 9 years ago
Attachment: | 1425061131-josm.png added |
---|
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Keywords: | barrier added |
---|
comment:3 by , 9 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:4 by , 3 years ago
Cc: | added |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
Summary: | "Ways with same position" gives errors that are not → [Patch] "Ways with same position" gives errors that are not |
I also consider this as a false positive warning of the validator. The proposed workaround of converting the inner area to a multipolygon is suboptimal (and IMO much more of a hassle and harder to maintain than simply using multiple ways).
I created a patch for the DuplicateWay test to fix this behaviour and only show a warning if the overlapping/duplicate ways describe the same semantic geometry type (area vs. linear feature)
i.e.:
area + area (e.g. wood + park) -> warning
line + line (e.g. barrier + waterway) -> warning
area + line (e.g. park + fence) -> no warning
PS: It would be nice if someone could verify the new/modified unit tests. I can't run them atm due to https://www.mail-archive.com/pkg-java-maintainers@alioth-lists.debian.net/msg12854.html
by , 3 years ago
Attachment: | 2021-08-15_validator_duplicate_way_consider_geometry_type.patch added |
---|
comment:5 by , 3 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
I think all four tagging methods mentioned in the help are all well established, so I agree it would be good allow them all without forcing one or the other.
Reg. the patch:
Minor issue: sonarlint complains about untaggedDuplicateReported == false
, it prefers !untaggedDuplicateReported
Unit tests pass but there is a problem in the logic:
Have one way tagged natural=wood + barrier=fence and a second (duplicate) way tagged only barrier=fence
Gives no warning, but it should. I think enum WayGeometryType
needs a 4th value like BOTH or UNCLEAR to handle this?
comment:6 by , 3 years ago
Keywords: | duplicate way added |
---|
comment:7 by , 3 months ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
@Waozboat: Any ideas what to do regarding the mentioned logic problem?
You can convert the
amenity=courthouse
way into a multipolygon and use thebarrier=fence
way as singleouter
member (as suggested by Frederick in the linked help ticket).If you draw two identical ways on top of each other, it is hard for other mappers to identify and maintain.