Sign inSign up

instedd/planwise-geofetcher

By instedd

Updated over 5 years ago

Image
0

10K+

instedd/planwise-geofetcher repository overview

Kml to GeoJson script

Running the script

To run local:

(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
To use docker:

(in project root)

$ docker build -t instedd/planwise:geojson-fetcher ./scripts/geojson
$ docker run --rm -v $(pwd)/data/geojson:/output instedd/planwise:geojson-fetcher ARG
Output files:

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

Example country code

ISO 3166-1 alpha-3

CountryCode
KenyaKEN
PakistanPAK
PhilippinesPHL
NepalNPL
Burkina FasoBFA

Tag summary

Content type

Image

Digest

Size

24.6 MB

Last updated

over 5 years ago

docker pull instedd/planwise-geofetcher