mirror of
https://github.com/systemed/tilemaker.git
synced 2026-05-06 08:26:46 -04:00
Add optional --quiet flag to tilemaker (#754)
This commit is contained in:
@@ -123,6 +123,9 @@ Don't forget to add `--store /path/to/your/ssd` if you don't have lots of RAM.
|
||||
Running tilemaker with the `--verbose` argument will output any issues encountered during tile
|
||||
creation.
|
||||
|
||||
Running tilemaker with the `--quiet` argument will suppress anything written to stdout during
|
||||
tile creation. stderr is unaffected.
|
||||
|
||||
You may see geometry errors reported by Boost::Geometry. This typically reflects an error
|
||||
in the OSM source data (for example, a multipolygon with several inner rings but no outer ring).
|
||||
Often, if the geometry could not be written to the layer, the error will subsequently show in
|
||||
|
||||
@@ -42,6 +42,7 @@ namespace OptionsParser {
|
||||
|
||||
OsmOptions osm;
|
||||
bool showHelp = false;
|
||||
bool quiet = false;
|
||||
bool verbose = false;
|
||||
bool mergeSqlite = false;
|
||||
OutputMode outputMode = OutputMode::File;
|
||||
|
||||
@@ -25,6 +25,7 @@ po::options_description getParser(OptionsParser::Options& options) {
|
||||
("merge" ,po::bool_switch(&options.mergeSqlite), "merge with existing .mbtiles (overwrites otherwise)")
|
||||
("config", po::value< string >(&options.jsonFile)->default_value("config.json"), "config JSON file")
|
||||
("process",po::value< string >(&options.luaFile)->default_value("process.lua"), "tag-processing Lua file")
|
||||
("quiet", po::bool_switch(&options.quiet), "quiet, suppress standard output")
|
||||
("verbose",po::bool_switch(&options.verbose), "verbose error output")
|
||||
("skip-integrity",po::bool_switch(&options.osm.skipIntegrity), "don't enforce way/node integrity")
|
||||
("log-tile-timings", po::bool_switch(&options.logTileTimings), "log how long each tile takes");
|
||||
|
||||
@@ -95,6 +95,11 @@ int main(const int argc, const char* argv[]) {
|
||||
|
||||
if (options.showHelp) { OptionsParser::showHelp(); return 0; }
|
||||
|
||||
if (options.quiet) {
|
||||
// Suppress anything written to std out
|
||||
std::cout.setstate(std::ios_base::failbit);
|
||||
}
|
||||
|
||||
verbose = options.verbose;
|
||||
|
||||
vector<string> bboxElements = parseBox(options.bbox);
|
||||
|
||||
Reference in New Issue
Block a user