Giter VIP home page Giter VIP logo

frostfs-locode-db's Introduction

NeoFS

UN/LOCODE database for ForstFS


GitHub release GitHub license

Overview

This repository contains instructions to generate UN/LOCODE database for FrostFS and raw representation of it. FrostFS 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.

Build

Prerequisites

Quick start

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

$ make
...
--out locode_db

Building

First unzip file with GeoJSON continents from this repository.

$ gunzip continents.geojson

Then run frost command to generate boltDB file.

$ frost util locode generate --help
generate UN/LOCODE database for FrostFS

Usage:
  frost 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)

$ ./frost util locode generate \
  --airports airports.dat \
  --continents continents.geojson \
  --countries countries.dat \
  --in 2022-1\ UNLOCODE\ CodeListPart1.csv,2022-1\ UNLOCODE\ CodeListPart2.csv,2022-1\ UNLOCODE\CodeListPart3.csv \
  --subdiv 2020-2\ SubdivisionCodes.csv \
  --out locode_db

Database generation might take some time!

You can test generated database with frost.

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

Building Debian package

The most simple way is to run a make target

$ make debpackage

When packages are built, you can clean up the leftover with

$ dh clean

or

$ make debclean

License

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.