20

Using Nominatim for for Autocompletion might be not the best idea. If you using the osm.org nominatim Server the usage policy forbid using Nominatim for Autocompletion: Auto-complete search: This is not yet supported by Nominatim and you must not implement such a service on the client side using the API. Also it is not really useful to use Nominatim for ...


11

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.geocode(address) except GeocoderTimedOut: if attempt <= max_attempts: return do_geocode(address, attempt=attempt+1) raise ...


8

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 For more info also see https://github.com/hrbrmstr/nominatim/issues/5


8

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 application. https://operations.osmfoundation.org/policies/nominatim/ Provide a valid HTTP Referer or User-Agent identifying the application (stock User-Agents ...


7

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 and geocoding would be very inefficient, if possible at all.


7

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.lon], you are adding both markers to your map.


6

Cool project! You might take a look at MapIt: Global: MapIt is a service that maps geographical points to administrative areas. This edition is based on source data from the totally amazing OpenStreetMap project, so add your boundaries there if they’re missing. If you’re in the UK our MapIt UK with open Ordnance Survey data will probably be more useful. ...


5

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 type. i.e. there could be a node with id 1023, a relationship with id 1023 as well as a way with id 1023. These are often called the OSM ID for that particular ...


5

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 your normal permission level, to do what your looking for you can sudo sh -c "carto project.mml > OSMBright.xml"


5

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 the related blog entry. If the plugin doesn't offer a method for entering your own AppKey (or a custom Nominatim URL) then you will have to wait for the plugin ...


5

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. Nominatim usually only returns address-related tags from OSM. Overpass API instead can query for all tags in OSM. You can search for POIs, parking spaces, roads, ...


5

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.pbf" then just use merged.pbf for the load. If you have more than that, you can just keep adding them, but you need a --merge for each one (so three countries ...


5

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 found: There is no data currently in OSM which matches your criteria. Data which you expect to match may be defective in some way. For example, if you ...


5

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" everything shall work.


5

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") reverse = RateLimiter(geolocator.reverse, min_delay_seconds=1) location = reverse((50.6539239, -120.3385242), language='en', exactly_one=True) print ...


4

Search-as-you-type is not possible in nominatim by design. It goes for exact matches of the search terms. Photon is based on Apache Solr which provides a built-in spatial support. Little effort should be needed to enhance photon to provide a location bias. The basic idea is to rank the search results by distance to the bounding box. I am the main ...


4

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 relation within the OSM data: go to http://nominatim.openstreetmap.org and try to find a boundary relation for your city ... for example type "Buxtehude" in its search ...


4

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 be local all postgres trust After altering this file, don't forget to restart your PostgreSQL server. If you're ...


4

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 offering raw data, for example Overpass API.


4

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, including the whole OSM point locations, so you can search for things like "target tacoma" or "bar asheville" and you'll get point locations for those items that ...


4

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 relation. In a reproducible perspective, what you can do I such a case could be to perform an overpass query, based on the attribute fetched from the Nominatim ...


4

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 https://github.com/helvalius/nominatim-docker. Then the installation is just the following: git clone https://github.com/helvalius/nominatim-docker.git cd ...


4

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 Which means: prefer German (de-DE or de) with an quality value of 0.8, then US-English (en-US) with an quality value of 0.5 (i.e. lower than German), then English (...


3

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 dump for mapnik, as explained here: www.switch2osm.org


3

It says here that the adress is calculate using a combination of admin boundaries, is_in tags and place features. For building level features addresses are calculated using the address of the most suitable street. Also it says here that nominatim does not process addr:* tags on buildings. The main OSM site also uses geonames database in searching, so it ...


3

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'. Simply edit this file and change the value from 9.3 to 9.4 will overcome the initial error message.


3

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&lat=-23.56320001&lon=-46.66140002&zoom=27&addressdetails=1"; Nominatim WIKI parameters


3

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&zoom=18&addressdetails=1 and at zoom level 8 this gives relation which corresponds to country nominatim.openstreetmap.org/reverse?format=xml&lat=...


3

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 from logs (syslog.log and kernel.log ) that took a LOT of space (more than 400G). To avoid this issue I change the logrotate conf (and set the max size to 100M) ...


3

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 relation on the object if present, boundary relations containing the object in question, and places containing the object or being near it. And maybe more. More ...


Only top voted, non community-wiki answers of a minimum length are eligible