Adding a new command line option osrm-extract --with-osm-metadata

This keep the metadata reader flag disabled by default unless explicitly specified.

Signed-off-by: FILLAU Jean-Maxime <jean-maxime.fillau@mapotempo.com>
This commit is contained in:
FILLAU Jean-Maxime
2017-01-04 10:49:34 +01:00
committed by Daniel J. H
parent aad2124faa
commit 300283d572
3 changed files with 13 additions and 2 deletions
+5 -1
View File
@@ -130,7 +130,11 @@ int Extractor::run(ScriptingEnvironment &scripting_environment)
auto extractor_callbacks = std::make_unique<ExtractorCallbacks>(extraction_containers);
const osmium::io::File input_file(config.input_path.string());
osmium::io::Reader reader(input_file, osmium::io::read_meta::no);
osmium::io::Reader reader(
input_file,
(config.use_metadata ? osmium::io::read_meta::yes : osmium::io::read_meta::no));
const osmium::io::Header header = reader.header();
unsigned number_of_nodes = 0;