Modify

Opened 2 years ago

Closed 22 months ago

Last modified 22 months ago

#22547 closed enhancement (fixed)

[Patch] tunnel=culvert should have waterway=* as well

Reported by: ivanbranco Owned by: team
Priority: normal Milestone: 23.02
Component: Core validator Version:
Keywords: tunnel culvert osmose combinations waterway overpass Cc:

Description (last modified by skyper)

Hi,

they redirect me here from the Osmose github since the error comes from this JOSM validator rule. I copy and paste my proposal:

"there's already a general check for the tunnel=* tag (item 9001 class 9001002). I would like to propose to make a more specific rule for one of its values which is tunnel=culvert. The Wiki says "A culvert is a device used to channel water", so I would expect this value to be matched with waterway=* only. At the moment we have 3914 highways tagged with tunnel=culvert (overpass query).

I would just flag every way tagged with tunnel=culvert which is not tagged with waterway=* as well, so I would expect all these ways to be flagged as an error: overpass query"

Attachments (1)

josm_22547.patch (2.7 KB ) - added by skyper 22 months ago.
patch

Download all attachments as: .zip

Change History (16)

comment:1 by anonymous, 2 years ago

And of course excluding man_made=tunnel + tunnel=culvert for tunnels mapped separately

comment:2 by skyper, 2 years ago

Component: CoreCore validator
Description: modified (diff)
Keywords: validator removed

tunnel relations with type=tunnel should be allowed, too.

in reply to:  2 comment:3 by anonymous, 2 years ago

Replying to skyper:

tunnel relations with type=tunnel should be allowed, too.

In this case the check could be done on the way members without a role or with "across" or "through" role, so we could find stuff like this culvert on a railway: https://www.openstreetmap.org/way/232574325

comment:4 by Famlam, 2 years ago

Or just limiting it to way?

in reply to:  4 comment:5 by ivanbranco, 2 years ago

Replying to Famlam:

Or just limiting it to way?

That's where most of errors are anyway. type=tunnel is not that used, and there are only 4 type=tunnel+tunnel=culvert. Of them 1 is correct and 3 wrong but all from the same user.

comment:6 by skyper, 2 years ago

way[tunnel=culvert][!waterway][man_made!=tunnel] {
  throwWarning: tr("{0} on suspicious object", "{0.key}");
  group: tr("suspicious tag combination");
}

Maybe, the general check at trunk/resources/data/validator/combinations.mapcss?rev=18546#L490 should be moved into a single block to ignore matches from this rule and in order to not get two warnings about one problem.

Last edited 2 years ago by skyper (previous) (diff)

by skyper, 22 months ago

Attachment: josm_22547.patch added

patch

comment:7 by skyper, 22 months ago

Summary: tunnel=culvert should have waterway=* as well[Patch] tunnel=culvert should have waterway=* as well

Find attached patch
It only warns about ways and excludes the matches from the general warning about suspicious object.

comment:8 by skyper, 22 months ago

Milestone: 23.02

comment:9 by taylor.smock, 22 months ago

Resolution: fixed
Status: newclosed

In 18659/josm:

Fix #22547: tunnel=culvert should have waterway=* or man_made=tunnel (patch by skyper)

comment:10 by stoecker, 22 months ago

I understand to mention the ticket, but why for the rule above? That makes no sense.

in reply to:  10 comment:11 by taylor.smock, 22 months ago

Replying to stoecker:

I understand to mention the ticket, but why for the rule above? That makes no sense.

I assume you are talking about the

/* {0.key} without {1.key} or {2.tag}, #22547 */

line.

I was going to ask skyper about it, then looked at some of the other rules nearby, which usually had ticket references.

comment:12 by stoecker, 22 months ago

Right, but shouldn't there be a comment above the new rule with the reference instead of adding that one rule above?

comment:13 by taylor.smock, 22 months ago

I guess I was looking at it as a section header.

/* {0.tag} without {1.key} (info level), #15107 */
[...snip...]

/* {0.key} without {1.key} or {2.tag}, #22547 */
way[bridge:structure           ][!bridge][man_made!=bridge],
*[segregated                   ][!highway][railway!=crossing] {
  throwWarning: tr("{0} without {1} or {2}", "{0.key}", "{1.key}", "{2.tag}");
  group: tr("missing tag");
}
way[tunnel=culvert][man_made!=tunnel][!waterway] {
  throwWarning: tr("{0} without {1} or {2}", "{0.tag}", "{1.tag}", "{2.key}");
  group: tr("suspicious tag combination");
  set TunnelCulvertWithoutWaterway;
}

/* {0.tag} without {1.tag} (info level) see #11600 #11393 #11850 */
[...snip...]

/* {0.tag} without {1.tag} */
[...snip...]

I probably should have copied that line to right above the culvert check, and then dropped the #22547 reference in the original line.

comment:14 by taylor.smock, 22 months ago

In 18660/josm:

See #22547: move ticket reference to just above rule

in reply to:  13 comment:15 by skyper, 22 months ago

Replying to taylor.smock:

I guess I was looking at it as a section header.

Yes, that was the thought behind it and the reason to not add an empty line in between the rules. Probably, I should have placed the ticket reference as separate comment just above the new line.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
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.