summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-20 19:25:08 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-20 19:36:20 (GMT)
commit8390a968688d6ba803afd24b216a0970f2cd30dd (patch)
tree240175cb9fd675faea53d677d5f8ec0576a54bed
parentde6d8f35ac494c5007d47b40a67cf947ce5e0fba (diff)
No tag filtering on level 17+
-rw-r--r--tools/vectorosm-tilecreator/main.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/vectorosm-tilecreator/main.cpp b/tools/vectorosm-tilecreator/main.cpp
index d44f36c..49c05ec 100644
--- a/tools/vectorosm-tilecreator/main.cpp
+++ b/tools/vectorosm-tilecreator/main.cpp
@@ -313,20 +313,25 @@ int main(int argc, char *argv[])
} else {
auto map = open(inputFileName, manager);
QStringList const tags = tagsFilteredIn(zoomLevel);
- TagsFilter tagsFilter(map.data(), tags);
- map.clear();
- VectorClipper processor(tagsFilter.accepted());
+ GeoDataDocument* input = map.data();
+ QSharedPointer<TagsFilter> tagsFilter;
+ if (zoomLevel < 17) {
+ tagsFilter = QSharedPointer<TagsFilter>(new TagsFilter(map.data(), tags));
+ input = tagsFilter->accepted();
+ map.clear();
+ }
+ VectorClipper processor(input);
auto mergeMap = open(parser.value("merge"), manager);
VectorClipper background(mergeMap.data());
- GeoDataDocument* landmass = background.clipTo(tagsFilter.accepted()->latLonAltBox());
+ GeoDataDocument* landmass = background.clipTo(input->latLonAltBox());
mergeMap.clear();
VectorClipper landMassClipper(landmass);
// @todo FIXME Assumes placemark ownership
//WayConcatenator concatenator(tagsFilter.accepted(), QStringList() << "highway=*", false);
- TileIterator iter(tagsFilter.accepted()->latLonAltBox(), zoomLevel);
+ TileIterator iter(input->latLonAltBox(), zoomLevel);
foreach(auto const &tileId, iter) {
GeoDataDocument* tile1 = processor.clipTo(zoomLevel, tileId.x(), tileId.y());
GeoDataDocument* tile2 = landMassClipper.clipTo(zoomLevel, tileId.x(), tileId.y());