summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-10-01 09:29:02 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-10-01 11:13:58 (GMT)
commit2a26eab3f1fcf0c18d0ad070a134a74e1e59a376 (patch)
treed80e2df2516722910fc225003574ad38c2e6a12e
parent8bb2d7884e57fed42a03ee639a4ff811c493810b (diff)
Do not write empty files
-rw-r--r--tools/vectorosm-tilecreator/main.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/vectorosm-tilecreator/main.cpp b/tools/vectorosm-tilecreator/main.cpp
index 3d61182..37a3019 100644
--- a/tools/vectorosm-tilecreator/main.cpp
+++ b/tools/vectorosm-tilecreator/main.cpp
@@ -192,6 +192,9 @@ GeoDataDocument* mergeDocuments(GeoDataDocument* map1, GeoDataDocument* map2)
bool writeTile(const QCommandLineParser &parser, const QString &outputName, GeoDataDocument* tile, int x, int y, int zoomLevel)
{
+ if (tile->size() == 0) {
+ return true;
+ }
QString const extension = parser.value("extension");
QString const baseDir = parser.isSet("output") ? (outputName + QLatin1Char('/')) : QString();
QString const outputDir = QString("%1%2/%3").arg(baseDir).arg(zoomLevel).arg(x);