[GIS] find country borders data in plain text format? (XML, JSON, CSV, etc)

datafile formatsjavascriptjson

I'm trying to obtain some data representing the borders of all countries in the world. This data doesn't have to be very precise, it is to draw the countries on a computer screen. I did a bit of research and keep stumbling upon binary formats for this data to be opened in various programs and what not. Here is an example of what would be a good resource, but unusable to me.

I don't want to have to write a binary format parser if possible. So my question is two-fold:

  • Are there any resources for simplified country borders in plain text? (XML, JSON, CSV, etc)
  • If not, are there any programs where I could export the binary data found all over the web in those formats?

Best Answer

I would suggest downloading and installing QGIS. You can then open the file that you link to and export the data in variety of formats.

The most common format for spatial data of this type is a shapefile which is one of the files that you linked to (TM_WORLD_BORDERS_SIMPL-0.2.zip). The reason that it is a zipfile is that there are several associated files with a shapefile and zipping them into a folder keeps them together.

When you download and install QGIS click on this iconenter image description here. Then navigate to the folder where you unzipped TM_WORLD_BORDERS_SIMPL-0.2.zip and add the file TM_WORLD_BORDERS_SIMPL-0.2.shp. You should then see the country boundaries on your screen.

Then, right-click on the file name on the left part of the screen. There will be an option save-as and you can choose a variety of formats (in my screenshot I choose geojson).

enter image description here