Name: magicbox-latlon-admin-server
Owner: unicef
Description: API that takes latitude/longitude pairs and returns an ID and metadata for the administrative boundaries they're located within
Created: 2017-10-26 03:28:40.0
Updated: 2018-05-16 18:35:46.0
Pushed: 2018-05-16 18:35:44.0
Size: 100
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a component of Magic Box
API that takes latitude/longitude pairs and returns an ID and metadata for the administrative boundaries they're located within
curl http://localhost:8082/api/coordinates/33.385586,66.445313
so": "AFG",
ame_0": "Afghanistan",
ame_1": "Daykundi",
ame_2": "Gizab",
dmin_id": "afg_1_6_53_gadm2-8",
on": 66.445313,
at": 33.385586
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
nvm install 8
git clone https://github.com/unicef/coordinates_to_admin_id_server
cd coordinates_to_admin_id_server
cp config-sample.js config.js
npm install
npm run build
curl http://localhost:8082/api/coordinates/33.385586,66.445313,-16.351768,-45.703125
"iso": "AFG",
"name_0": "Afghanistan",
"name_1": "Daykundi",
"name_2": "Gizab",
"admin_id": "afg_1_6_53_gadm2-8",
"lon": 66.445313,
"lat": 33.385586
"iso": "BRA",
"name_0": "Brazil",
"name_1": "MinasGerais",
"name_2": "Riachinho",
"name_3": "Riachinho",
"admin_id": "bra_33_13_2179_4369_gadm2-8",
"lon": -45.703125,
"lat": -16.351768