Modify

Opened 7 months ago

Closed 2 months ago

Last modified 2 months 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 7 months ago.
sample17025.osm (4.4 KB) - added by GerdP 3 months ago.
17025.patch (689 bytes) - added by GerdP 3 months ago.

Download all attachments as: .zip

Change History (12)

Changed 7 months ago by GerdP

Attachment: sample.osm added

comment:1 Changed 7 months ago by Don-vip

Description: modified (diff)

Changed 3 months ago by GerdP

Attachment: sample17025.osm added

Changed 3 months ago by GerdP

Attachment: 17025.patch added

comment:2 Changed 3 months ago by GerdP

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 Changed 3 months ago by Klumbumbus

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

comment:4 Changed 2 months ago by GerdP

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 Changed 2 months ago by GerdP

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

comment:6 Changed 2 months ago by Klumbumbus

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)

comment:7 in reply to:  5 Changed 2 months ago by Klumbumbus

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 2 months ago by Klumbumbus (previous) (diff)

comment:8 Changed 2 months ago by Klumbumbus

Milestone: 19.04

comment:9 Changed 2 months ago by GerdP

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.