Last active
August 2, 2016 18:25
-
-
Save olafveerman/1496a45735f9a79ff2d76584e1cc7621 to your computer and use it in GitHub Desktop.
countries.json = a geojson with data from Natural Earth
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const turf = require('turf'); | |
const countries = require('./countries.json') | |
let bboxs = countries.features.map(function(feature) { | |
if (feature.properties.ISO_A2 !== '-99') { | |
return { | |
iso: feature.properties.ISO_A2, | |
name: feature.properties.ADMIN, | |
bbox: turf.bbox(feature) | |
} | |
} | |
}) | |
console.log(bboxs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment