From 65531482be02697f06d5540350cbb7a4fcd0b9a6 Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Fri, 21 Apr 2023 17:23:19 +0300 Subject: [PATCH] [#5] Update README for local build From now on, we redistribute our data sources with our repository. Need to highlight the licenses for all data sources used. Signed-off-by: Stanislav Bogatyrev --- README.md | 50 +++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index c86c08b..1cc0b23 100644 --- a/README.md +++ b/README.md @@ -6,27 +6,28 @@

--- -![GitHub release](https://img.shields.io/github/release/TrueCloudLab/frostfs-locode-db.svg) -![GitHub license](https://img.shields.io/github/license/TrueCloudLab/frostfs-locode-db.svg?style=popout) - # 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. +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. + +This repository tools generate UN/LOCODE database for FrostFS using data from +following sources: +- [UN/LOCODE](https://unece.org/trade/cefact/UNLOCODE-Download) database in CSV + format, licensed under the [ODC Public Domain Dedication and Licence (PDDL)](http://opendatacommons.org/licenses/pddl/1-0/) +- [OpenFlight Airports and + Countries](https://raw.githubusercontent.com/jpatokal/openflights/master/data/) + databases, licensed under the [GNU AGPL-3.0 + license](https://github.com/jpatokal/openflights/blob/master/LICENSE) +- [OpenStreetMap](https://www.openstreetmap.org/)® open data, licensed under the [Open Data Commons Open + Database License](https://opendatacommons.org/licenses/odbl/) (ODbL) # Build ## Prerequisites -- Latest [frost] tool(https://github.com/TrueCloudLab/frostfs-node) -- [UN/LOCODE](https://unece.org/trade/cefact/UNLOCODE-Download) - database in CSV format -- [OpenFlight Airports](https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat) - database -- [OpenFlight Countries](https://raw.githubusercontent.com/jpatokal/openflights/master/data/countries.dat) - database +- Latest [frostfs-cli](https://git.frostfs.info/TrueCloudLab/frostfs-node) tool ## Quick start @@ -40,18 +41,13 @@ $ make ## Building -First unzip file with GeoJSON continents from this repository. +Then run frost-cli command to generate boltDB file. ``` -$ gunzip continents.geojson -``` - -Then run frost command to generate boltDB file. -``` -$ frost util locode generate --help +$ frostfs-cli util locode generate --help generate UN/LOCODE database for FrostFS Usage: - frost util locode generate [flags] + frostfs-cli util locode generate [flags] Flags: --airports string Path to OpenFlights airport database (csv) @@ -62,20 +58,20 @@ Flags: --out string Target path for generated database --subdiv string Path to UN/LOCODE subdivision database (csv) -$ ./frost util locode generate \ +$ ./frostfs-cli 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 \ + --in 2022-2\ UNLOCODE\ CodeList.csv \ + --subdiv 2022-2\ SubdivisionCodes.csv \ --out locode_db ``` **Database generation might take some time!** -You can test generated database with `frost`. +You can test generated database with `frostfs-cli`. ``` -$ frost util locode info --db locode_db --locode 'RU LED' +$ frostfs-cli util locode info --db locode_db --locode 'RU LED' Country: Russia Location: Saint Petersburg (ex Leningrad) Continent: Europe