Replies: 7 comments 1 reply
-
https://nominatim.openstreetmap.org/ui/reverse.html?lat=36.04682&lon=-79.02518&zoom=18 If 36.04682,-79.02518 returns only the state then I'd say something is wrong with your import. Did the import finish without errors? Can you give us more information on Nominatim version, when it was imported and what was imported? Nominatim only imports named features. Driveway vs service roads makes no difference here because both have no names in OSM data. https://nominatim.openstreetmap.org/ui/reverse.html?lat=38.9616587&lon=-94.69911872009547&zoom=18 The house with house number at 38.9616587, -94.69911872009547 is in OSM data so it should also return the house number in your local installation.
Nominatim has no turn style feature. Are you talking about a different software? |
Beta Was this translation helpful? Give feedback.
-
Ah sorry, in the title you said you changed the style file. Can you post the changes (only the relevant lines). Were the changes made before or after the import? |
Beta Was this translation helpful? Give feedback.
-
From file import-extratags.lua Import works fine worked to completion, database check lists OK for all aspects and test lookup values work and all other aspects of the site runs as expected. |
Beta Was this translation helpful? Give feedback.
-
Version nominatim 4.4 postgres 14 ubuntu 22 new UI website 3.5.2. Imported North America from 4/21/2024, using the python web process with apach2. No additional software is installed and it's a fresh install. |
Beta Was this translation helpful? Give feedback.
-
Satelliate imagery suggests there's a house at https://nominatim.openstreetmap.org/ui/reverse.html?lat=36.04682&lon=-79.02518&zoom=18 but the address is not in OpenStreetMap data yet. With default installation Nominatim returns the house with number 4301 about 40m away. When you set I can't reproduce that only the state is returned. I see An address with house number is a better result than an unnamed road but that road happens to be closer to the search point. Are you suggesting the road should be ignored in this case? Local test import: cd ~/Nominatim
git checkout v4.4.0
cd ~/nominatim-project
nominatim --version
Nominatim version 4.4.0-0 (e5a5f026)
wget https://download.geofabrik.de/north-america/us/north-carolina-latest.osm.pbf
# https://www.openstreetmap.org/relation/2528730
osmium getid --add-referenced --output orange-county-boundary.osm north-carolina-latest.osm.pbf r2528730
cp ~/Nominatim/settings/import-extratags.lua ~/nominatim-project/import-extratags2.lua
vi import-extratags2.lua
# now change service = 'named', to service = 'always', and save file
cat .env
NOMINATIM_DATABASE_DSN='pgsql:dbname=nominatim_orange_county'
NOMINATIM_IMPORT_STYLE=import-extratags2.lua
nominatim import --osm-file orange-county.osm.pbf --no-partitions --reverse-only --no-updates
nominatim reverse --lat 36.04682 --lon -79.02518 --format jsonv2 {
"place_id": 180710,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
"osm_type": "way",
"osm_id": 844934264,
"lat": "36.046770492246075",
"lon": "-79.02509969760324",
"category": "highway",
"type": "service",
"place_rank": 27,
"importance": 0.04000999999999999,
"addresstype": "road",
"name": "",
"display_name": "Orange County, 27705, United States",
"boundingbox": [
"36.0466405",
"36.0470292",
"-79.0251487",
"-79.0249402"
]
} |
Beta Was this translation helpful? Give feedback.
-
The starting point lat\lon is the service road not the main road. The live version snaps to the main road than the house. The service "always" version searches from the original point of the service road (as it should) looking for a house number and returns no results. I felt it should return the house number as it's so close to the house. I have a lot of other service points that are doing this action in the area. //second House search call local should return the house that is close by. The point is from the service road that I would have called a driveway. |
Beta Was this translation helpful? Give feedback.
-
I see what you mean. The algorithm works a bit different: it gives you the closest road or POI object. If the closest object happens to be a road, it tries to further qualify the position with a housenumber. The previous incarnation of the reverse algorithm did something along the lines of simply finding the closest POI/housenumber first but that often lead to very confusing results near street corners. We could consider doing something special with unnamed streets. It needs careful consideration because there are parts of the world where streets without a name are the norm. |
Beta Was this translation helpful? Give feedback.
-
What did you search for?
localhost/reverse.php?lat=36.04682&lon=-79.02518&zoom=18&format=jsonv2
What result did you get?
Local server returns just the State.
//House call local should return the house that is close by. The point is the service road that I would have called it a driveway.
FROM placex
WHERE ST_DWithin(placex.geometry, ST_GeomFromText(POINT(- 79.02518 36.04682), 4326), 0.001)
AND placex.parent_place_id = 54760332::BIGINT
AND (
placex.rank_address = 30
AND (
placex.housenumber IS NOT NULL
OR placex.name ? 'addr:housename'
)
)
AND placex.indexed_status = 0::SMALLINT
AND placex.linked_place_id IS NULL
ORDER BY distance LIMIT 1::INTEGER
https://nominatim.openstreetmap.org/reverse.php?format=jsonv2&addressdetails=1&lat=38.9616587&lon=-94.69911872009547&zoom=16&extratags=1
Returns what I want from getting the main road and than finding the house number, but if you had set turn style service tag to named it pulls the driveway and the second find house call does not return a result from the service street.
What result did you expect?
I would expect it to find the house number from the driveway/service road just as it does from the main street.
Like this returns
//Returns what I had expected above.
FROM placex
WHERE ST_DWithin(placex.geometry, ST_GeomFromText(POINT(- 79.02518 36.04682), 4326), 0.001)
AND placex.parent_place_id = 3359285::BIGINT
AND (
placex.rank_address = 30
AND (
placex.housenumber IS NOT NULL
OR placex.name ? 'addr:housename'
)
)
AND placex.indexed_status = 0::SMALLINT
AND placex.linked_place_id IS NULL
ORDER BY distance LIMIT 1::INTEGER
When the result in the right place and just named wrongly:
When the result missing completely:
Further details
Thanks for your service.
Beta Was this translation helpful? Give feedback.
All reactions