NOTE: this tool is available in the Planwise Tools Docker image. See scripts/Dockerfile and scripts/tools/README
(in project root)
$ cd scripts/geojson
$ npm install
$ ./gadm2geojson ARG ../../data/geojson
Note: If you prefer to run the script directly with Node.js, you could replace the last line with:
$ node gadm2geojson.js ARG ../../data/geojson
The script generates two geojson files:
<country_code>_adm0.geojson<country_code>_adm1.geojson
and they will be placed at the output folder inside another folder with the country code as name.
For example:
If the output folder is ../../data/geojson then the files will be:
../../data/geojson/ARG/ARG_adm0.geojson../../data/geojson/ARG/ARG_adm1.geojson
| Country | Code |
|---|---|
| Kenya | KEN |
| Pakistan | PAK |
| Philippines | PHL |
| Nepal | NPL |
| Burkina Faso | BFA |