Why not ask your question on the new OpenStreetMap Community Forum?

My task is simple that is to geocode the addresses. As I googled to this, suggestions were to use nominatim. But using nominatim requires a web server. Besides that what are the advantages of geocoding through nominatim instead of doing manual geocoding ? There is not much help to do manual geocoding.

asked 08 Feb '17, 19:00

3yK's gravatar image

accept rate: 0%


Could you explain what you mean by "manual geocoding"? It's not really very clear...

(08 Feb '17, 19:13) SomeoneElse ♦

manual geocoding in the sense, we query the address and get the lat lon from the tables.

(08 Feb '17, 19:15) 3yK

You seem to be under the impression that every address is present in OSM as one record, with the columns "house number", "street", "post code", "city", "country" nicely filled out. (Or to be precise, the addr:* columns.)

This is not the case.

First of all, only a fraction of existing houses/addresses actually are in OSM. Second, only roughly a third of these have a house number mapped, and even fewer have addr:street or addr:city.

Therefore your "manual geocoding" would be much more than "select coordinates from table where city='a' and street='b' and housenumber='c'". You'd have to make sure those objects that only have house numbers are still matched to the nearest street, and those that don't have a city or post code specification are matched to whatever polygon they are in (and if there's not even a city polygon but just some place=city node three kilometres away, maybe that's the city for this address). You'd also have to evaluate interpolation ranges, where OSM just has a range of house numbers and not individual numbers.

You can do all this, but you would essentially be re-inventing Nominatim.

Hence the suggestion to simply use it. A web server is not required, you can call the PHP code from the command line, or even adapt the PHP code to read input from a file.

permanent link

answered 08 Feb '17, 19:35

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%


+1 for Frederik's answer but you may also want to look at Pelias https://github.com/pelias/pelias

As best I can tell the publicly available Nominatim and Pelias servers typically include more sources than just OSM which is good as the address data in OSM can be spotty.

In either case you should be able to programmatically query the server. It seems that the publicly available servers for both have some usage restrictions so you may want to setup your own server.

(08 Feb '17, 21:37) n76

Is there a good source where I can learn about all these polygons, interpolations, roads, lines, points, ways etc in detail and how its built ?

(09 Feb '17, 11:50) 3yK

I am new to php and scripting. Is there any guides or tutorials around, on how to geocode using these osm2pgsql tables using nominatim php files ?

(09 Feb '17, 16:17) 3yK

Also see https://wiki.openstreetmap.org/wiki/Search_engines for more possibilites, maybe some serverless ones?

(13 Feb '17, 19:57) stephan75
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Feb '17, 19:00

question was seen: 1,930 times

last updated: 13 Feb '17, 19:57

powered by OSQA