mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
This commit is contained in:
31
generator/address_parser/parser_tool.cpp
Normal file
31
generator/address_parser/parser_tool.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#include "generator/utils.hpp"
|
||||
|
||||
#include "processor.hpp"
|
||||
|
||||
#include "platform/platform.hpp"
|
||||
|
||||
#include <gflags/gflags.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
DEFINE_string(data_path, "./data", "Data path with 'borders' folder inside");
|
||||
DEFINE_string(output_path, "", "Output files path");
|
||||
DEFINE_uint64(threads_count, 0, "Desired number of threads. 0 - number of threads is set automatically");
|
||||
|
||||
|
||||
MAIN_WITH_ERROR_HANDLING([](int argc, char ** argv)
|
||||
{
|
||||
std::string usage("Tiger addresses processor. Sample usage:\n");
|
||||
gflags::SetUsageMessage(usage + "tar -xOzf tiger-nominatim-preprocessed-latest.csv.tar.gz | " + argv[0] + " --output_path=... ");
|
||||
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
|
||||
size_t const threadsNum = FLAGS_threads_count != 0 ? FLAGS_threads_count : GetPlatform().CpuCores();
|
||||
CHECK(!FLAGS_output_path.empty(), ("Set output path!"));
|
||||
|
||||
addr_generator::Processor processor(FLAGS_data_path, FLAGS_output_path, threadsNum);
|
||||
processor.Run(std::cin);
|
||||
|
||||
return 0;
|
||||
})
|
||||
Reference in New Issue
Block a user