4

I'd like to populate a database with common location information.

I'm not entirely certain that addresses across the globe have similar or even the same entities as the Country, State, City, and Zipcode that we are so familiar with here in the United States.

Does anyone know of a web service or other method that would be useful for obtaining such data and populating a local database with its contents?

(or conversely just contacting the web service to obtain this information as needed)

leeand00
  • 163
  • 1
  • 5

1 Answers1

2

GeoNames has a database you can download and a web service that you could just connect to. See http://ian01.geog.psu.edu/geoserver_docs/data/geonames/installing.html for an example of how to download it and load it into a postgis database.

Ian Turton
  • 81,417
  • 6
  • 84
  • 185
  • The tld field is missing from the sql ddl...do you know what data type this is supposed to be? – leeand00 Dec 03 '11 at 19:56
  • Actually a couple of fields from the ddl listed are missing...anything that I have below surrounded in ??? is a field missing from the ddl

    LOAD DATA LOCAL INFILE '/home/leeand00/geolocations/countryInfo.txt' INTO TABLE countryinfo FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (iso_alpha2, iso_alpha3, iso_numeric, fips_code, name, capital, areainsqk, population, continent, ???tld???, ???currency_code???, ??currency_name???, ???phone???, languages, geonameid, ???neighbours???, ???equivalent_fips_code???)

    – leeand00 Dec 03 '11 at 20:08
  • I use Postgis so I can't help with that – Ian Turton Dec 04 '11 at 20:11
  • Is Postgis a database? – leeand00 Dec 05 '11 at 19:37
  • yes - http://postgis.refractions.net/ – Ian Turton Dec 06 '11 at 08:40