WIP: Source of UN/LOCODE database generated by FrostFS CLI.
Find a file
Stanislav Bogatyrev 606f993290 [#11] Fix lintian warnings
Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2022-10-28 09:05:48 +03:00
.github Add DCO check and CODEOWNERS 2022-10-26 16:14:18 +03:00
debian [#11] Fix lintian warnings 2022-10-28 09:05:48 +03:00
.gitignore [#11] Fix lintian warnings 2022-10-28 09:05:48 +03:00
CHANGELOG.md Release v0.2.1 2021-11-02 17:41:48 +03:00
continents.geojson.gz Initial commit 2021-02-10 15:04:51 +03:00
LICENSE Initial commit 2021-02-10 15:04:51 +03:00
Makefile [#11] Fix lintian warnings 2022-10-28 09:05:48 +03:00
README.md Add Makefile 2022-10-27 14:58:58 +03:00
VERSION Add Makefile 2022-10-27 14:58:58 +03:00

NeoFS

UN/LOCODE database for NeoFS


GitHub release GitHub license

Overview

This repository contains instructions to generate UN/LOCODE database for NeoFS and raw representation of it. NeoFS uses UN/LOCODE in storage node attributes and storage policies. Inner ring nodes converts UN/LOCODE into human-readable set of attributes such as continent, country name, etc. You can find out more in NeoFS Specification.

Build

Prerequisites

Quick start

Just run make to generate locode_db file for use with NeoFS InnerRing nodes.

$ make
...
--out locode_db

Building

First unzip file with GeoJSON continents from this repository.

$ gunzip continents.geojson

Then run neofs-cli command to generate boltDB file.

$ neofs-cli util locode generate --help
generate UN/LOCODE database for NeoFS

Usage:
  neofs-cli util locode generate [flags]

Flags:
      --airports string     Path to OpenFlights airport database (csv)
      --continents string   Path to continent polygons (GeoJSON)
      --countries string    Path to OpenFlights country database (csv)
  -h, --help                help for generate
      --in strings          List of paths to UN/LOCODE tables (csv)
      --out string          Target path for generated database
      --subdiv string       Path to UN/LOCODE subdivision database (csv)
      
$ ./neofs-cli util locode generate \
  --airports airports.dat \
  --continents continents.geojson \
  --countries countries.dat \
  --in 2020-2\ UNLOCODE\ CodeListPart1.csv,2020-2\ UNLOCODE\ CodeListPart2.csv,2020-2\ UNLOCODE\ CodeListPart3.csv \
  --subdiv 2020-2\ SubdivisionCodes.csv \
  --out locode_db

Database generation might take some time!

You can test generated database with neofs-cli.

$ neofs-cli util locode info --db locode_db --locode 'RU LED'
Country: Russia
Location: Saint Petersburg (ex Leningrad)
Continent: Europe
Subdivision: [SPE] Sankt-Peterburg
Coordinates: 59.53, 30.15

License

This project is licensed under the CC Attribution-ShareAlike 4.0 International - see the LICENSE file for details