Skip to main content

There are probably lists, so if you are looking for single regions or languages, then this answer may be a bit much, but...

You can download the entire planet from Open Street Maps (OSM) and then filter out the relevant tags (see this answeranswer). In your case you would filter on place, see this example filter:

./osmfilter planet.osm --keep="place=city =town =village" > my_places.osm

Your geocoordinates will actually be a multi-polygon, but that's OK because you can either simplify to a geopoint (e.g. use the centroid), or show the entire polygon range in your map.

Instead of planet.osm you can also do this for illinois.osm, or whatever region you want.

There are probably lists, so if you are looking for single regions or languages, then this answer may be a bit much, but...

You can download the entire planet from Open Street Maps (OSM) and then filter out the relevant tags (see this answer). In your case you would filter on place, see this example filter:

./osmfilter planet.osm --keep="place=city =town =village" > my_places.osm

Your geocoordinates will actually be a multi-polygon, but that's OK because you can either simplify to a geopoint (e.g. use the centroid), or show the entire polygon range in your map.

Instead of planet.osm you can also do this for illinois.osm, or whatever region you want.

There are probably lists, so if you are looking for single regions or languages, then this answer may be a bit much, but...

You can download the entire planet from Open Street Maps (OSM) and then filter out the relevant tags (see this answer). In your case you would filter on place, see this example filter:

./osmfilter planet.osm --keep="place=city =town =village" > my_places.osm

Your geocoordinates will actually be a multi-polygon, but that's OK because you can either simplify to a geopoint (e.g. use the centroid), or show the entire polygon range in your map.

Instead of planet.osm you can also do this for illinois.osm, or whatever region you want.

Source Link
philshem
  • 17.7k
  • 7
  • 69
  • 171

There are probably lists, so if you are looking for single regions or languages, then this answer may be a bit much, but...

You can download the entire planet from Open Street Maps (OSM) and then filter out the relevant tags (see this answer). In your case you would filter on place, see this example filter:

./osmfilter planet.osm --keep="place=city =town =village" > my_places.osm

Your geocoordinates will actually be a multi-polygon, but that's OK because you can either simplify to a geopoint (e.g. use the centroid), or show the entire polygon range in your map.

Instead of planet.osm you can also do this for illinois.osm, or whatever region you want.