Opened 11 years ago

Closed 6 years ago

#2478 closed enhancement (fixed)

Handle one street split into several ways

Reported by: Ed Avis Owned by: twain
Priority: minor Milestone:
Component: nominatim Version:
Keywords: Cc:


Often in OSM the same street, which would be shown as one named street on a paper map and get one entry in an 'A-Z' index, is mapped as several ways joined together. This is often necessary but it means multiple results are returned from Nominatim when a conventional street atlas would just give one.

For example, the first four results for <> are all the same street.

Perhaps if two or more ways join up and have the same name, they can be treated as a single street whose location is somewhere near the centre.

Change History (7)

comment:1 Changed 11 years ago by Tom Hughes

Component: adminnominatim
Owner: changed from Tom Hughes to openstreetmap@…

comment:2 Changed 11 years ago by twain

Owner: changed from openstreetmap@… to twain
Status: newassigned

Ways with identical addresses are merged, otherwise they are both shown.

I think an extra option to control the amount of merging may be needed.

comment:3 Changed 10 years ago by MichalP

another example

to make it harder:

  • opposite lanes are not connected (they are connected by different roads) (but they are close to each other, like couple of meters)
  • each lane is in a different district and has different postcode (middle of the road is the administrative border)
  • some of the ways may have unfilled other names (like local_name), either on purpose or unintentionally

is it possible to merge results if they are closer than say 10 meters ?

maybe group by ST_Distance (if it worked...)

where would you suggest to start hacking ?

comment:4 Changed 10 years ago by MichalP

there is proposal for relation collected ways

this one could be used to determine one street.

comment:5 Changed 8 years ago by datendelphin

Resolution: fixed
Status: assignedclosed

seems to be fixed in the mean time

comment:6 Changed 7 years ago by jbohmdk

Resolution: fixed
Status: closedreopened

Problem is still there, two examples that I recently looked at in detail:

Harløsevej (unique in the current planet data)

Tulstrup Have, Hillerød

("ø" is a national letter, just copy/paste it).

These two roads are typical examples of the reasons a road is split in the osm data. Harløsevej is a long tertiary road, which is split whenever things like speed limits or sidewalk presence changes. Both roads also feature side branches sharing the name (they are effectively shared driveways, some with, some without, public right of way). One end of Harløsevej also features a split into right and left lanes near a roundabout. Neither has (nor should have) any special route relation, all have direct connections between their parts (shared nodes, no need for fuzzy distance checks).

However Nominatum currently (2013-08-09 01:20 UTC) returns both roads as a large number of hits, in seemingly random order.

The rule should be simple: If two roads with the same name, share a node and share (derived) is_in relations and other Nominatim relevant data, they should become one in the Nominatim database. If they share the same name and share a node, but differ in properties that Nominatim needs for other operations, they should be internally linked, so a search returns just a single merged object consisting of the segments that match the search criteria (for instance, if the search is limited to the part of Harløsevej that has an implicit or explicit is_in Tjæreby, then those parts should be returned as one stretch of road which is less than the full road, but still the merge of many segments).

comment:7 Changed 6 years ago by Sarah Hoffmann

Resolution: fixed
Status: reopenedclosed

The duplicates of Harløsevej are related to an update bug where the wrong default admin_level was assigned. That has been fixed in the meantime and should take effect the next time the OSM is changed.

For merging streets see ticket #4952.

Note: See TracTickets for help on using tickets.