Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insufficient Data #583

Open
AIML-ankit opened this issue Sep 25, 2024 · 1 comment
Open

Insufficient Data #583

AIML-ankit opened this issue Sep 25, 2024 · 1 comment
Labels

Comments

@AIML-ankit
Copy link

Describe the bug
I Build the OWN OSM by below command build successfully but it's not giving information for class, type, place_rank and importance column.

Command to Build -

docker run -it -e PBF_URL=https://download.geofabrik.de/north-america/us/illinois-latest.osm.pbf -e REPLICATION_URL=https://download.geofabrik.de/north-america/us/illinois-updates/ -e IMPORT_WIKIPEDIA=true -e IMPORT_US_POSTCODES=true -e IMPORT_STYLE=extratags -e IMPORT_TIGER_ADDRESSES=true --shm-size=30g -p 8080:8080 --name nominatim mediagis/nominatim:4.4

Expected behavior
'class':
'type':
'place_rank':
'importance':

Above columns data should be there but not present in OWN OSM server. i tested for 1000 records, same issue. .

Screenshots & Logs

Local server Test

from shapely.geometry import Point
from geopy.geocoders import Nominatim
point = Point(-88.27359644571939,42.21781794230143)
geo_locator = Nominatim(domain=local_server, scheme='http')
res = geo_locator.reverse((point.y, point.x), exactly_one=True)
res.raw

{'place_id': 1310910,
'licence': 'Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright',
'osm_type': 'way',
'osm_id': 255773224,
'lat': '42.2170837',
'lon': '-88.27399593831584',
'display_name': 'Sage Products, New Haven Drive, Cambria, Cary, McHenry County, 60013, United States',
'address': {'building': 'Sage Products',
'road': 'New Haven Drive',
'residential': 'Cambria',
'town': 'Cary',
'county': 'McHenry County',
'postcode': '60013',
'country': 'United States',
'country_code': 'us'},
'boundingbox': ['42.2162802', '42.2185722', '-88.2754137', '-88.2725732']}

Nominatim server -

from shapely.geometry import Point
from geopy.geocoders import Nominatim
point = Point(-88.27359644571939,42.21781794230143)
geo_locator = Nominatim(user_agent="message is not")
res = geo_locator.reverse((point.y, point.x), exactly_one=True)
res.raw

{'place_id': 324241635,
'licence': 'Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright',
'osm_type': 'way',
'osm_id': 363362535,
'lat': '42.21902048769007',
'lon': '-88.27359799251208',
'class': 'highway',
'type': 'tertiary',
'place_rank': 26,
'importance': 0.10000999999999993,

'addresstype': 'road',
'name': 'Three Oaks Road',
'display_name': 'Three Oaks Road, Cary, McHenry County, Illinois, 60013, United States',
'address': {'road': 'Three Oaks Road',
'town': 'Cary',
'county': 'McHenry County',
'state': 'Illinois',
'ISO3166-2-lvl4': 'US-IL',
'postcode': '60013',
'country': 'United States',
'country_code': 'us'},
'boundingbox': ['42.2190180', '42.2190210', '-88.2738994', '-88.2720590']}

Desktop / Server (please complete the following information):

  • OS & Version: 24.04.1 Ubuntu
  • Docker Version: Docker version 24.0.5,
  • Nominatim Version: 4.4

Additional context
Please share if i missed anything while building the server or i need to run any additional command. i want class,type,place_rank and importance date in local API query.

@AIML-ankit AIML-ankit added the bug label Sep 25, 2024
@mtmail
Copy link
Contributor

mtmail commented Sep 25, 2024

nominatim.openstreetmap.org runs Nominatim 4.5. It's output is generated by the new Python frontend. The Docker Nominatim 4.4 is still using the legacy PHP frontend.

Try setting the format to jsonv2 https://nominatim.org/release-docs/latest/api/Output/ Looking at the geopy source code I don't see that's possible, it hardcodes json.

https://geocoder.readthedocs.io/providers/OpenStreetMap.html#nominatim-server uses jsonv2 it seems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants