2020-07-23 22:19:26 -03:00
|
|
|
import https from 'https';
|
|
|
|
import fs from 'fs';
|
|
|
|
|
|
|
|
https.get(
|
2020-08-13 09:16:20 -03:00
|
|
|
'https://overpass-export.hotosm.org/api/interpreter?data=[out:json][timeout:250];(node["place"="country"];relation(1993208);relation(1216719);relation(1278736);relation(270009);relation(36989);relation(1964272);relation(1703814);node(2000314677););out body;',
|
2020-07-23 22:19:26 -03:00
|
|
|
(res) => {
|
|
|
|
var data = '';
|
|
|
|
res.on('data', (chunk) => (data += chunk));
|
|
|
|
res.on('end', () => fs.writeFileSync(`./res/countries.json`, data));
|
|
|
|
},
|
|
|
|
);
|