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)

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.

  • The tld field is missing from the sql ddl...do you know what data type this is supposed to be? – leeand00 Dec 3 '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 3 '11 at 20:08
  • I use Postgis so I can't help with that – Ian Turton Dec 4 '11 at 20:11
  • Is Postgis a database? – leeand00 Dec 5 '11 at 19:37
  • yes - postgis.refractions.net – Ian Turton Dec 6 '11 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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