Best way to import list of US states, cities and counties w/ geographic data

This is more of a question of were I can find a reliable data source than how to actually do it. I would like find a list of all US states, with cities, counties in each city with geographic data for the approx. center of each state, city and county (lat and long). I would like to make this data a utility level feature in a content management framework I’m developing. I also need to make sure to maintain the relationship between state <= city <= county. So I need some type of list that provides that in XML format, json, csv or something. Any ideas?

Thanks

not sure if this is what you’re after.

http://www.freedownloadscenter.com/Web_Authoring/Misc__Web_Authoring_Tools/World_Cities_Database__Free_Edition_.html

bazz

That doesn’t look very reliable and doesn’t mention anything about county mappings. The list doesn’t necessarily need to be free, so long as its reliable and has all the things I’m looking for.

Best bet would be US census data I’d think. And we should have a new dataset soon.

Other option is to just use someone’s geocoding API (Google or Yahoo! come to mind) and fob the problem off on the big boys.

Here’s the stock file I use to import into my databases. It’s current up to 2007 IIRC.

Comma delineated text file.

Sam, I also have one for Canada somewhere on my system if you’d like it.