Giter VIP home page Giter VIP logo

Comments (6)

mtmail avatar mtmail commented on June 12, 2024

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.

but if you had set turn style service tag to named it pulls the driveway and the second find house call

Nominatim has no turn style feature. Are you talking about a different software?

from nominatim.

mtmail avatar mtmail commented on June 12, 2024

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?

from nominatim.

dmurtha avatar dmurtha commented on June 12, 2024

From file import-extratags.lua
under highway
original
service = 'named',
updated
service = 'always',

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.

from nominatim.

dmurtha avatar dmurtha commented on June 12, 2024

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.

from nominatim.

mtmail avatar mtmail commented on June 12, 2024

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 service = 'always', in the import style then it returns the unnamed service road.

I can't reproduce that only the state is returned. I see "display_name": "Orange County, 27705, United States", but that's because I only imported the nearby area, not the whole state.

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"
    ]
}

from nominatim.

dmurtha avatar dmurtha commented on June 12, 2024

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.
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

from nominatim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.