Modify

Opened 12 months ago

Closed 10 months ago

Last modified 10 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 10 months ago.
patch

Download all attachments as: .zip

Change History (16)

comment:1 Changed 12 months ago by anonymous

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

comment:2 Changed 12 months ago by skyper

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

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

comment:3 in reply to:  2 Changed 12 months ago by anonymous

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 Changed 12 months ago by Famlam

Or just limiting it to way?

comment:5 in reply to:  4 Changed 12 months ago by ivanbranco

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 Changed 12 months ago by skyper

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 12 months ago by skyper (previous) (diff)

Changed 10 months ago by skyper

Attachment: josm_22547.patch added

patch

comment:7 Changed 10 months ago by skyper

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 Changed 10 months ago by skyper

Milestone: 23.02

comment:9 Changed 10 months ago by taylor.smock

Resolution: fixed
Status: newclosed

In 18659/josm:

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

comment:10 Changed 10 months ago by stoecker

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

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

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 Changed 10 months ago by stoecker

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

comment:13 Changed 10 months ago by taylor.smock

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 Changed 10 months ago by taylor.smock

In 18660/josm:

See #22547: move ticket reference to just above rule

comment:15 in reply to:  13 Changed 10 months ago by skyper

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.