I have a list of 2000 addresses like this:

Macquarie Park, New South Wales
Kitami, Hokkaido
Hachioji, Tokyo
Pokemon Inc. Asahi Bldg. 7F 3-2-6 Asakusabashi Taito-ku, Tokyo 111-0053 Japan

And I want to display them on a map without sending these addresses over the Internet.

Geocoding addresses:

  • City-level precision is OK.
  • Some addresses (like the 4th one above) contain many details, they can be skipped but it might be tricky for an algorithm to find what can be safely skipped.
  • Many addresses don't have the country name. Note that Google Maps find these without any problem, so I guess there usually is no ambiguity.
  • Places all over the world.
  • Some of the addresses use non-Latin scripts. Bonus for geocoding them too.

Output format:

  • .osm/.obf/.kml file output is OK.
  • Raw latitude/longitude output is OK too.
  • If the software insists on showing results as a map, it is OK too. I don't need very detailed maps, a map where names of cities above 100000 inhabitants are visible is enough.


  • Runs on my local computer (I can install any OS).
  • Easy to install, without downloading gigabytes of data.
  • Free.
  • 1
    Related: gis.stackexchange.com/questions/6/… May 14, 2014 at 12:51
  • 1
    The requirement to do without downloading Gigabytes of data conflicts with the "offline" requirement. Either one or the other. May 14, 2014 at 12:57
  • @DeerHunter: The question you linked to is only for the USA, unfortunately.
    – Nicolas Raoul
    May 15, 2014 at 3:31
  • @DeerHunter: I am only looking for town-level precision. A database containing coordinates of all cities above 100000 inhabitants and their address matching expressions would probably fit in 100 MB. That would be enough.
    – Nicolas Raoul
    May 15, 2014 at 3:32

1 Answer 1


This could be possible with the OpenStreetMap API, licensed under ODbL.

I haven't used it for a while, but basically you define a rectangle (bbox, bounding box) of two points (S, N, W and E). Since the maximum area of the bounding box is limited, you'd need to repeat the query for small parts of the world (where areas with a size of Germany are typically ok).

Then you define conditions of what you want to receive. For cities, place=city would be such a condition. Unfortunately the catgorization of cities may be country specific, so you need to read the documentaion and find out.

Example API query for cities in Germany (roughly, since rectangled):


The result is quite small (155 kB) and contains relevant information:

<node id="17193023" lat="49.5981208" lon="11.0036532">
    <tag k="ele" v="279"/>
    <tag k="is_in" v="Mittelfranken,Bayern,Bundesrepublik Deutschland,Europe"/>
    <tag k="is_in:country" v="Germany"/>
    <tag k="is_in:country_code" v="DE"/>
    <tag k="name" v="Erlangen"/>
    <tag k="name:ta" v="எர்லங்கன்"/>
    <tag k="place" v="city"/>
    <tag k="population" v="105624"/>

This is an answer because:

  • city level precision is available (as described above)
  • the algorithm to find cities can be defined by you (some programming knowledge needed, though)
  • your algorithm can handle ambiguosities
  • worldwide: OSM data is really good weanwhile
  • non-latin city names supported, see example above for name:ta
  • it provides raw longitude/latitude output (see lon and lat)
  • runs on your computer (you can use any programming language that can download data via HTTP)
  • easy to install: no installation, it's a webservice
  • without downloading gigabytes of data: small amount of data, see example above
  • free: ODbL

I'm sorry that this answer still needs some custom programming, but considering the age of the question and no answers yet, I guess that your request is very specific can can only be solved like this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.