[GIS] List of the United States (US) state boundaries / borders as latitude/longitude pairs for geofence

geofencinglatitude longitudeunited-states

I'm just trying to find a single simple file (CSV or XML ideally) which has the latitude and longitude pairings for each of the 50 United States (plus DC, though the addition of provinces such as Puerto Rico and Guam, or even Canada and Mexico wouldn't be unwelcome).

Is there such a list available somewhere? I've tried searching and browsing OpenStreetMaps, downloading the US.zip from GeoNames, the Census website, etc., but everything seems to come in shape files and such which I'm not terribly familiar with.

My end goal (if it helps) is to simply look-up the state by latitude/longitude using my LAMP stack (Linux Apache (actually using Nginx) MySQL and PHP), though I will have 1000s of records per hour, so using an external web service isn't feasible.

Best Answer

From your comments, it looks like you'd like to convert those shapefiles to CSV.

As to why this data isn't readily available, it all depends on your application and what you want to do with the data, so what may work for one person may not work for another. For instance, if your accuracy needs to be better than 2 meters, then your resulting CSV/XML file is going to be huge.

If your data doesn't need to be detailed, then there are generalization techniques, but there are different levels of generalization, and it usually leaves gaps/overlaps at the borders, and that takes time to clean up.