Skip to content

๐Ÿ”Ž Get the OpenStreetMap's relation id from a country code.

License

Notifications You must be signed in to change notification settings

simonepri/osm-countries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

osm-countries

Travis CI Codecov npm npm version npm dependencies npm dev dependencies

๐Ÿ”Ž Get the OpenStreetMap relation id from a country code.

Install

$ npm install --save osm-countries

Usage

const osmCountries = require('osm-countries');

osmCountries.get('ITA');
// => '365331'

osmCountries.get('USA');
// => '148838'

API

get(code) โ‡’ string

Converts an alpha-3 iso 3166-1 code to its corrispective relation id on OSM.

Returns: string - OSM relation id of the given country.

Param Type Description
code string Alpha-3 iso 3166-1 country code.

map() โ‡’ object

Returns a map from alpha-3 iso 3166-1 codes to theyr corrispective relation ids on OSM.

Returns: object - Map of all OSM relation ids.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

๐Ÿ”Ž Get the OpenStreetMap's relation id from a country code.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published