Skip to content

Instantly share code, notes, and snippets.

@tmaybe
Last active December 19, 2015 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmaybe/5989042 to your computer and use it in GitHub Desktop.
Save tmaybe/5989042 to your computer and use it in GitHub Desktop.
Afghanistan Albers

A map of Afghanistan with provinces and districts, using the techniques described in Let’s Make a Map. Centered with the technique described in Project to Bounding Box.

Shapefile data retreived on July 12, 2013 from MapCruzin.com at Afghanistan International Boundaries, Afghanistan Provincial Boundaries and Afghanistan District Boundaries. Original source of the data is cited as Afghanistan Information Management Services, from the Afghanistan Shape Files page, but the links to the files there are broken.

Convert shape file to GeoJSON file

ogr2ogr -f GeoJSON provincial.json admin2_poly_32.shp

Convert and combine GeoJSON files into a single TopoJSON file, making the contents of either DIST_32_NA or PRV_NAME the id attribute, renaming the PROV_32_NA property to province, and preserving the province property

topojson --id-property DIST_32_NA,PRV_NAME -p province=PROV_32_NA -p province -o combined.json international-geo.json provinces-geo.json districts-geo.json

This file has been truncated, but you can view the full file.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment