On Tue, Feb 13, 2018 at 11:07:56AM +0100, Nick Meessen - de Wit wrote:
> We’re trying to use Nominatim to resolve road segments, which is working for
> most roads.
> Only we’re not able to resolve any link roads, ramps for motorways etc.
> Nominatim seems to be skipping these, and snapping to the first road in the
> Which seems to be correct, looking at the code, and this issue from years
> back: https://trac.openstreetmap.org/ticket/5251
> We’ve looked at the Nominatim DB, and tried querying them directly using the
> place table and placex table, which did not yield any results. ‘place’ table.
> When using https://overpass-turbo.eu <https://overpass-turbo.eu/> for
> example, and querying for 'highway=motorway_link’ we’re getting the results
> we’d like to see, for e.g. we’re receiving the way_ids.
> - https://www.openstreetmap.org/way/6960060
> - https://www.openstreetmap.org/way/6960114
> - https://www.openstreetmap.org/way/6960093
> And then when querying these directly in the Nominatim DB, from the place /
> placex tables by ‘osm_id’ they seem to absent.
That is correct. All unnamed link roads are dropped during
import already. The motivation behind that is that Nominatim
is mainly for forward searching where unnamed links would
just clutter the database with data that is never used.
> Is there another way to query these from the Nominatim DB? Or can we get them
> imported as well, as they seem to have been skipped while populating the
It is possible when you run your own instance but you have to
hack a bit at the code. All this is currently hard-coded in the
osm2pgsql source code.
If you have a look at output-gazetteer.cpp around here:
The struct UnnamedPredicate contains the function that decides
what main tags an OSM object must have, so that it is dropped when
there is no name tag. The very last line has objects with
highway=*_link. Remove that line, recompile everything and the
links should be there after the next import.
Also check the other lines in that functions, you might be interested
in other dropped highway types as well.
Geocoding mailing list