Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17025 closed defect (fixed)

Validator doesn't find all highway nodes connected to buildings

Reported by: GerdP Owned by: team
Priority: normal Milestone: 19.04
Component: Core validator Version:
Keywords: template_report Cc: Klumbumbus

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Load attached sample.osm
  2. Run validator

What is the expected result?

two warnings "node connects highway and building"

What happens instead?

only one warning

Please provide any additional information below. Attach a screenshot if possible.

The corresponding rule doesn't work for the first node of a building.

way[building][building!=no] > node.node_in_highway!.first_last_node {
  throwWarning: tr("node connects highway and building");
}

To fix that we would have to distinct between first_last_node in building way and first_last_node in highway way.

Build-Date:2018-11-25 06:31:38
Revision:14442
Is-Local-Build:true

Identification: JOSM/1.5 (14442 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 1547 MB / 3641 MB (636 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:53205, -ea, -Dfile.encoding=UTF-8]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (34535)
+ apache-commons (34506)
+ buildings_tools (34724)
+ download_along (34503)
+ ejml (34389)
+ geotools (34513)
+ importvec (34520)
+ jaxb (34506)
+ jts (34524)
+ merge-overlap (34664)
+ o5m (34405)
+ opendata (34698)
+ pbf (34576)
+ poly (34546)
+ reverter (34552)
+ undelete (34568)
+ utilsplugin2 (34506)

Last errors/warnings:
- W: Test 'Unconnected highways' completed in 0 ms
- W: Test 'Unconnected natural lands and landuses' completed in 0 ms
- W: Test 'Unconnected power ways' completed in 0 ms
- W: Test 'Untagged and unconnected nodes' completed in 1 ms
- W: Test 'Untagged, empty and one node ways' completed in 0 ms
- W: Test 'Way connected to Area' completed in 0 ms
- W: Test 'Wrongly Ordered Ways' completed in 1 ms
- W: Failed to locate resource '/README'.
- W: Failed to locate resource '/CONTRIBUTION'.
- W: Failed to locate resource '/LICENSE'.

Attachments (3)

sample.osm (1.4 KB ) - added by GerdP 6 years ago.
sample17025.osm (4.4 KB ) - added by GerdP 6 years ago.
17025.patch (689 bytes ) - added by GerdP 6 years ago.

Download all attachments as: .zip

Change History (12)

by GerdP, 6 years ago

Attachment: sample.osm added

comment:1 by Don-vip, 6 years ago

Description: modified (diff)

by GerdP, 6 years ago

Attachment: sample17025.osm added

by GerdP, 6 years ago

Attachment: 17025.patch added

comment:2 by GerdP, 6 years ago

Cc: Klumbumbus added

Please review the attached patch. I am not sure if a closed way with highway=* should always trigger this warning?

comment:3 by Klumbumbus, 6 years ago

I have this on my todo list and will answer in the next days.

comment:4 by GerdP, 6 years ago

BTW: I first tried something like

node.node_in_highway.first_last_node {
  set first_last_highway_node; 
}

and it took a while to find out that it doesn't work. I found #10215, so this is known, but I wonder why the rule is still excepted by the parser? If I got that right parent selectors never work with ClassConditions?

comment:5 by GerdP, 6 years ago

Ah, sorry, forget that. The rule works fine, it just doesn't help to solve the problem.

comment:6 by Klumbumbus, 6 years ago

Resolution: fixed
Status: newclosed

In 15016/josm:

fix #17025 - warn about "node connects highway and building" too if

  • the suspect node is the first and/or last node of the building
  • the suspect node is the first and last node of a closed highway

(patch by GerdP an Klumbumbus)

in reply to:  5 comment:7 by Klumbumbus, 6 years ago

Replying to GerdP:

Ah, sorry, forget that. The rule works fine, it just doesn't help to solve the problem.

... and it took me a while to understand why this doesn't solve the problem ;)

I now added a rule to detect the top right closed way in your example file too and moved the set first_last_node code part down in the file where it is actually used as it is no longer used here at the "node connects highway and building" rule.

I think the rule should be fine now, what do you think?

Last edited 6 years ago by Klumbumbus (previous) (diff)

comment:8 by Klumbumbus, 6 years ago

Milestone: 19.04

comment:9 by GerdP, 6 years ago

Yes, works fine.

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.