osmlab / osmlint

An open source suite of js validators for OpenStreetMap data, to identify common geometry and metadata problems at scale.
ISC License
84 stars 10 forks source link

Undetected crossinghighways #286

Open maning opened 5 years ago

maning commented 5 years ago

We are seeing cases of undetected crossinghighways. Posting stub ticket as we investigate the problem.

To replicate.

  1. Download latest qa-tiles
  2. osmlint crossinghighways --zoom=12 --bbox="[-88.3265, 41.4343, -87.1057, 42.2823]" united_states_of_america.mbtiles > crossinghighways-chicago.json
  3. Inspect in your own data browser of choice.

@srividyacb

Rub21 commented 5 years ago

@maning you are right. looks like the issue is here: https://github.com/osmlab/osmlint/blob/master/validators/crossingHighways/map.js#L156-L174, since the way https://www.openstreetmap.org/way/597384240/history is not forming a segment to check if those roads are intersecting, we may need a way to check if an object has the same start and the end coordinates. it must resolve the issue.

maning commented 5 years ago

@Rub21 thanks for the hint!

https://github.com/osmlab/osmlint/blob/master/validators/crossingHighways/map.js#L156-L174

Can you explain what ^^ line do?

Rub21 commented 5 years ago

@maning the code line: https://github.com/osmlab/osmlint/blob/master/validators/crossingHighways/map.js#L68, is evaluating if two highways are intersecting, according to the starts and end coordinates, so in case the start and the end coordinates are the same it won't be intersecting with the others neighbors roads.