
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@ban-team/gazetteer
Advanced tools
Bibliothèque permettant de déterminer le découpage administratif dans lequel se trouve des coordonnées géographiques au format WGS-84.
Données fournies :
Niveau administratif | Source | Géométrie |
---|---|---|
Région | INSEE/COG | dérivée d'ADMIN EXPRESS |
Département | INSEE/COG | dérivée d'ADMIN EXPRESS |
EPCI | DGCL | dérivée d'ADMIN EXPRESS |
Commune | INSEE/COG | dérivée d'ADMIN EXPRESS |
Communes anciennes | INSEE/COG | OSM |
NB : Les géométries des collectivités d'outremer proviennent d'OSM.
⚠️ Le chemin d’accès aux données doit être renseigné, soit via le paramètre dbPath
, soit via la variable d’environnement GAZETTEER_DB_PATH
.
const {createGazetteer} = require('@ban-team/gazetteer')
const g = await createGazetteer(options)
await g.find({lon: 5.9225, lat: 49.2741})
>
{
communeAncienne: { nom: 'Mance', code: '54341' },
commune: { nom: 'Val de Briey', code: '54099' },
epci: { nom: 'CC Orne Lorraine Confluences', code: '200070845' },
arrondissement: { nom: 'Briey', code: '541' },
departement: { nom: 'Meurthe-et-Moselle', code: '54' },
region: { nom: 'Grand Est', code: '44' }
}
await g.find({lon: 0, lat: 0})
>
null
On clone le dépôt puis on installe les dépendances.
yarn
On lance la commande dédiée à la production des données.
yarn build
Le fichier résultant gazetteer.sqlite
servira ensuite à utiliser la bibliothèque en elle-même.
MIT
FAQs
Lightweight gazetteer for France 🇫🇷
We found that @ban-team/gazetteer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.