All Projects β†’ simonepri β†’ Country Iso

simonepri / Country Iso

Licence: mit
πŸ—Ί Get the ISO 3166-1 alpha-3 country code from geographic coordinates.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Country Iso

geofiddle
Geometric conversions between different formats and projections
Stars: ✭ 15 (-89.36%)
Mutual labels:  geojson, maps
django-graphql-geojson
GeoJSON support for Graphene Django
Stars: ✭ 61 (-56.74%)
Mutual labels:  geojson, maps
check-geojson
a checker for the geojson format. goes beyond a schema, checking semantics and producing character-level warnings.
Stars: ✭ 36 (-74.47%)
Mutual labels:  geojson, maps
geojson-editor
A modified version of Googles Simple GeoJSON Editor
Stars: ✭ 43 (-69.5%)
Mutual labels:  geojson, maps
Mapbox Gl Native
Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
Stars: ✭ 4,091 (+2801.42%)
Mutual labels:  geojson, maps
geoJSON-Nepal
GeoJSON for Nepal. πŸ‡³πŸ‡΅
Stars: ✭ 49 (-65.25%)
Mutual labels:  geojson, maps
osm-geojson
πŸ”° Get GeoJSON of a OpenStreetMap's relation from the API.
Stars: ✭ 42 (-70.21%)
Mutual labels:  geojson, maps
vaguely-rude-places
The map of Vaguely Rude Place Names
Stars: ✭ 19 (-86.52%)
Mutual labels:  geojson, maps
Android Maps Utils
Maps SDK for Android Utility Library
Stars: ✭ 3,330 (+2261.7%)
Mutual labels:  geojson, maps
chilemapas
Mapas terrestres de Chile con topologias simplificadas.
Stars: ✭ 23 (-83.69%)
Mutual labels:  geojson, maps
echarty
Minimal R/Shiny Interface to ECharts.js
Stars: ✭ 49 (-65.25%)
Mutual labels:  geojson, maps
Geoswift
The Swift Geometry Engine.
Stars: ✭ 1,267 (+798.58%)
Mutual labels:  geojson, maps
Mapstore2
Modern webmapping with OpenLayers, Leaflet and React
Stars: ✭ 251 (+78.01%)
Mutual labels:  geojson, maps
osm-static-maps
Openstreetmap static maps is a nodejs lib, CLI and server open source inspired on google static map service
Stars: ✭ 130 (-7.8%)
Mutual labels:  geojson, maps
Geojsonify
Easily add GeoJson layers to your Maps
Stars: ✭ 141 (+0%)
Mutual labels:  geojson, maps
is-sea
🌊 Check whether a geographic coordinate is in the sea or not on the earth.
Stars: ✭ 34 (-75.89%)
Mutual labels:  geojson, maps
Geo Maps
πŸ—Ί High Quality GeoJSON maps programmatically generated.
Stars: ✭ 1,098 (+678.72%)
Mutual labels:  geojson, maps
Mapbox Gl Native Android
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
Stars: ✭ 135 (-4.26%)
Mutual labels:  geojson, maps
Gis Dataset Brasil
Geographic Information Systems (GIS) Dataset Brasil - Coleção de shapefiles, GeoJSON e TopoJSON prontas para uso
Stars: ✭ 121 (-14.18%)
Mutual labels:  geojson
Maps Api For Javascript Examples
Self-contained examples for Maps API for JavaScript v3.
Stars: ✭ 130 (-7.8%)
Mutual labels:  maps

country-iso

Travis CI Codecov npm npm version npm dependencies npm dev dependencies

πŸ—Ί Get ISO 3166-1 alpha-3 country code from geographic coordinates.

Click on the map to see a live preview.

Synopsis

Given the latitude and longitude coordinates this package returns the country code of the country in which the coordinates fall into.

The package internally uses @geo-maps/countries-maritime map with 10m resolution to give you the right country code. The accuracy of the map has been tested with 23785 cities but the demo allows you to actually test it manually by just clicking on the map to see what it returns.

Do you believe that this is useful? If so, support us with a ⭐️!

Install

$ npm install --save country-iso

Usage

You can query any (lat,lng) pair on the earth. It also works for territorial waters and disputed countries.

const countryIso = require('country-iso');

// Query a point in Italy.
countryIso.get(41.9028, 12.4964);
// => ['ITA']

// Query a disputed country.
countryIso.get(24, -14);
// => ['ESH', 'MAR']

// Query a point somewhere in Atlantic Ocean.
countryIso.get(40, -40);
// => []

API

get(lat, lng) β‡’ Array.<string>

Searches for every country which contains the point (lat, lng).

Returns: Array.<string> - Array of ISO 3166 alpha-3 country code for the geographic coordinates.

Param Type Description
lat number The latitude of the point.
lng number The longitude of the point.

Related

  • is-sea: 🌊 Check whether a geographic coordinate is in the sea or not on the earth.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].