11
votes
Accepted
Avoid time out error Nominatim Geopy OpenStreetMap
You could make a recursive function. Just typing Python-esque pseudo-code:
from geopy.exc import GeocoderTimedOut
def do_geocode(address, attempt=1, max_attempts=5):
try:
return geopy....
- 8,263
11
votes
Accepted
User_Agent argument in Nominatim in GeoPy
User_Agent is an http request header that is sent with each request.
Nominatim requires this value to be set to your application name. The goal is to be able to limit the number of requests per ...
- 37.3k
10
votes
Accepted
Bulk reverse geocoding with Geopy using built-in rate_limiter
The correct usage of RateLimiter for reverse geocoding would be:
from geopy.geocoders import Nominatim
from geopy.extra.rate_limiter import RateLimiter
geolocator = Nominatim(user_agent="application"...
- 226
8
votes
Accepted
How to obtain openstreet API key for nominatim (r)?
In the comments of the source code you linked there is an explanation:
@param key To access the openstreetmap API you need a valid API key. You can get it for free at https://developer.mapquest.com
...
- 2,049
7
votes
Accepted
Can we use existing planet database for Nominatim
You will have to create a new one. Nominatim requires a different database scheme than your rendering stack because it needs to perform really different queries. Using the same database for rendering ...
- 5,879
7
votes
Accepted
Leaflet marker/icon help
It looks strange that you add both a GeoJSON layer from result.geojson and a marker created from [result.lat, result.lon].
If result.geojson contains the same point information as [result.lat, result....
- 6,973
6
votes
Accepted
Difference between osm_id and place_id?
Actually there isn't anything called an osm_id, at-least not officially.
In the OSM database, each node, relationship, way etc have a unique id.This uniqueness is only within a particular element ...
- 40.5k
6
votes
Difference between Nominatim and Overpass-Api?
Nominatim is a geocoder and reverse-geocoder. You can search for an address and it will return the location. Likewise you can search for a location and it will return its full address hierarchy. ...
- 5,879
6
votes
MMQGIS Geocode is failing in QGIS 3
I have found the solution.
As the error suggests: the SSL in Python is not correctly installed.
If you go to /application/python(your version) and then click "Install Certificates.command" ...
- 121
5
votes
Accepted
Permission Denied when installing openstreetmap server
The problem you ran into has nothing to do with carto, it's an issue with your shell command, when you run sudo carto project.mml > OSMBright.xml carto runs as root, but the file write happens as ...
- 1,369
5
votes
Accepted
OSM Place Search in QGIS not working anymore?
It says: The AppKey submitted with this request is invalid.
MapQuest changed their licensing model. Since Sep 15th, 2015, they require a valid API Key for their services. For more information read ...
- 5,879
5
votes
Accepted
How to put the two regions and countries data on OpenStreetMap into postgresql?
It would probably be cleaner to join the two PBF files before you do the load. Something like
osmosis --read-pbf file="countryA.pbf" --read-pbf file="countryB.pbf" --merge --write-pbf file="merged....
- 12.7k
5
votes
Is geocoding with Nominatim available for all the countries?
Based on Nominatim FAQ, there are many reasons of why your search didn't get any result:
Why wasn't anything found for my search?
There are a number of reasons why no result may have been ...
- 38.8k
4
votes
Accepted
How to use the Tile Server to fetch latitude/longitude data
The purpose of a tile server is to deliver tiles (raster images).
If you want to geocode then use/install a geocoder, for example Nominatim. If you want to access raw data then use/install a service ...
- 5,879
4
votes
Osm2pgsql failed due to error when I try to import data into PostgreSQL
I have resolved this error:
The problem is still your pg_hba.conf file (/etc/postgresql/9.3/main/pg_hba.conf). This line:
local all postgres peer
Should ...
- 285
4
votes
OSM Place Search in QGIS not working anymore?
Yep, seems like until they get a way to authenticate, OSM Place Search Plugin is not at option.
But, the good news, is that Quick Finder plugin does as good if not better, for finding locations, ...
- 941
4
votes
How to get nodes in a particular city? [Open Street Maps - Overpass API / Nominatim]
When there is a boundary relation for that city area (like political boundaries) you can use its name for a query via overpass-api or overpass-turbo.
So first find out about any good boundary ...
- 1,099
4
votes
Accepted
Find parent place using nominatim
I guess the relationship is a bit tricky to discover. In fact i guess there is no relationship in the sense of OSM: I mean your building is not referenced as a member of the University of texas ...
- 853
4
votes
Accepted
Nominatim disk space Needed for whole planet-osm
I am posting the answer of my question for who need...
The disk space needed for whole planet is ~759G.
During the installation I face to disk space memory (see my post). After some check it came ...
4
votes
Latitude/Longitude to city and zip, batch convertion
I discovered that the complexity of installing own instance of Nominatim can be mitigated by using a docker container where the set up script is already prepared.
I used a docker script available at ...
- 161
4
votes
Openstreetmap Nominatim web service API - Result language
Your browser and other HTTP/HTTPS clients will sent an Accept-Language field in the HTTP request header. This can for example look like:
Accept-Language: de-DE,de;q=0.8,en-US;q=0.5,en;q=0.3\r\n
...
- 5,879
4
votes
Accepted
Cannot get OSM tags when downloading data with osmnx functions which are based on Nominatim requests
I had a similar problem, I wanted to access the surface of streets.
Answer
The setting of the attributes that are transferred to the graph are defined in the settings.py
useful_tags_path = ['bridge'...
- 56
4
votes
Accepted
Get state but want country in GeoPy and Nominatim
When you try embedding exactly_one=False parameter (by default it is True) into your code, like
from geopy.geocoders import Nominatim
geolocator = Nominatim(user_agent='anonymous@gmail.com', timeout=...
- 27.5k
4
votes
Combining location from Nominatim with Overpass API query using Python
Since the overpass_query is just a string, you can use string formatting:
overpass_query = f"""
[out:json];
(node["shop"](around:500,{lat},{lng});
);out;
""&...
- 9,848
3
votes
OSM import fails due to non-matching PostgreSQL version
Alright, when installing Nominatim a folder 'settings' is created, holding a PHP file named 'settings.php'. Within this file all sorts of constants are defined - also 'CONST_Postgresql_Version'.
...
- 1,147
3
votes
Accepted
Is it possible to render map tiles with a Nominatim PostGIS database?
No, it's not possible to recycle the database, as both tools do very different tasks and therefore they create very specific datastructures to run nice and smooth.
Please import another time your DB ...
- 1,652
3
votes
Find parent place using nominatim
Use Zoom Level in query to get to higher level.
e.g At level 18 this place gives way which is street
nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&
lon=-1.81602098644987&...
- 8,222
3
votes
Sending valid UserAgent or Referer when Nominatim reverse geocode gets blocked?
by including the email parameter in my request, nominatim osm server acccepted that as a valid user agent.
$url = "http://nominatim.openstreetmap.org/reverse?email=myemail@myserver.com&format=xml&...
- 477
3
votes
How Nominatim calculates addresses
Take the link from iant's comment and click on details. On the database side, Nominatim calculates an address hierarchy. It does this by looking at address tags on the object, associatedStreet ...
- 5,879
3
votes
How does Nominatim know my address which is not (as far as I can tell) in OSM Database?
I posted the question because it took me a while to find the answer, and maybe this will help others.
I learned that Nominatum uses OSM data AND tiger map data as input in the US, because address ...
- 793
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
nominatim × 155openstreetmap × 90
geocoding × 37
python × 20
postgresql × 16
overpass-api × 14
reverse-geocoding × 14
geopy × 13
osm2pgsql × 12
postgis × 8
openlayers × 8
leaflet × 7
ubuntu × 7
javascript × 6
osmosis × 5
overpass-turbo × 5
qgis × 4
api × 4
tiger × 4
polygon × 3
geojson × 3
data × 3
google-maps × 3
mmqgis × 3
mapquest × 3