Modify

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 Don-vip)

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)

1425061131-josm.png (458.4 KB ) - added by Don-vip 9 years ago.
2021-08-15_validator_duplicate_way_consider_geometry_type.patch (9.2 KB ) - added by Woazboat 3 years ago.

Download all attachments as: .zip

Change History (9)

by Don-vip, 9 years ago

Attachment: 1425061131-josm.png added

comment:1 by Don-vip, 9 years ago

Description: modified (diff)

comment:2 by Don-vip, 9 years ago

Keywords: barrier added

comment:3 by bastiK, 9 years ago

Resolution: worksforme
Status: newclosed

You can convert the amenity=courthouse way into a multipolygon and use the barrier=fence way as single outer 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.

comment:4 by Woazboat, 3 years ago

Cc: Woazboat added
Resolution: worksforme
Status: closedreopened
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

comment:5 by GerdP, 3 years ago

Owner: changed from team to GerdP
Status: reopenednew

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 skyper, 3 years ago

Keywords: duplicate way added

comment:7 by GerdP, 3 months ago

Owner: changed from GerdP to Sylves
Status: newneedinfo

@Waozboat: Any ideas what to do regarding the mentioned logic problem?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as needinfo The owner will remain Sylves.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from Sylves to the specified user. Next status will be 'new'.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from Sylves to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.