Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18106 closed defect (fixed)

Unexpected results from UnconnectedWays

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


What steps will reproduce the problem?

  1. Load attached file uncon3.osm
  2. Run validator
  3. Note that you get only one warning "Way end node near other highway (1)" for the topmost node
  4. Revert the direction of the residential road or remove the node in the lower left or the next one or both
  5. Run validator again for each case, note that now no warning is produced

What is the expected result?

Same number of warnings in all cases, not sure if 0 or 2

What happens instead?

One or no warning depending on direction or nodes which are far from the problem case.

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

Problem is caused by an error in Node.isConnectedTo() which doesn't seem to do what the comment says. The result depends on the number of ways and the direction.

Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-08-26 08:55:27 +0200 (Mon, 26 Aug 2019)
Build-Date:2019-08-26 06:57:10
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15322 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1903 (18362)
Memory Usage: 645 MB / 1820 MB (125 MB allocated, but free)
Java version: 1.8.0_221-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-XX:StartFlightRecording=name=MyRecording2,settings=d:\dbg\gerd.jfc, -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=e:\ld\perf_20190903_155936.jfr]
Dataset consistency test: No problems found

+ OpeningHoursEditor (34977)
+ apache-commons (34908)
+ buildings_tools (34982)
+ continuosDownload (82)
+ ejml (35049)
+ geotools (34908)
+ jaxb (35014)
+ jts (35064)
+ o5m (34908)
+ opendata (35102)
+ pbf (35033)
+ poly (34991)
+ reverter (35084)
+ undelete (34977)
+ utilsplugin2 (35098)

Validator rules:
+ c:\josm\core\data\validator\geometry.mapcss

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (1)

uncon3.osm (1.4 KB ) - added by GerdP 5 years ago.

Download all attachments as: .zip

Change History (6)

by GerdP, 5 years ago

Attachment: uncon3.osm added

comment:1 by GerdP, 5 years ago

Other problems with the current implementation:

  • A highway ending close to a way with tags highway=cycleway + railway=abandoned is ignored, this combination is quite common.
  • If the unconnected end of a highway is close to more than one highway the warning might not show the closest one.

Working on a patch, also for #18051. I am still trying to understand the code, the results of the test changed heavily over the years and I am not sure what to keep and what to throw away.

comment:2 by Klumbumbus, 5 years ago

Component: CoreCore validator

comment:3 by GerdP, 5 years ago

Resolution: fixed
Status: newclosed

In 15335/josm:

fix #18051 and #18106
This is more or less a rewrite of the code, I hope I didn't introduce too many new problems.

  • always consider all ways with matching tag when calculating unconnected nodes
  • for partial tests filter the calculated errors (this means a small additional delay for this test when uploading data)
  • fix recursion problem in isConnectedTo so that it doesn't stop too early
  • remove code which excluded eg. ways with highway=cycleway + railway=abandoned or waterway=river + boundary=administrative
  • improve performance, esp. use HashSet when calculating types of nodes in method addNode() and QuadBuckets only when searching is done. Together with other changes this reduces runtime by ~50%, so I hope the delay for the upload is not too high.

comment:4 by GerdP, 5 years ago

Milestone: 19.09

comment:5 by GerdP, 5 years ago

In 15336/josm:

see #18106: Make sure that we report closest the way, minor code cleanup

Modify Ticket

Change Properties
Set your email in Preferences
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.