summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-11 05:48:07 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-11 05:53:40 (GMT)
commit939554605ddb02436a1941dff54954dd249452bc (patch)
tree5a054d030d4666535fa6619eead03c225316ffcb
parent7744b947ca351368a0344ad1c661580ff5fbba56 (diff)
Processing chain for tile level 11
-rw-r--r--tools/vectorosm-tilecreator/main.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/vectorosm-tilecreator/main.cpp b/tools/vectorosm-tilecreator/main.cpp
index 56e10d3..b3e85e9 100644
--- a/tools/vectorosm-tilecreator/main.cpp
+++ b/tools/vectorosm-tilecreator/main.cpp
@@ -226,6 +226,45 @@ int main(int argc, char *argv[])
qInfo() << tile->name() << " done";
delete tile;
}
+ } else if (zoomLevel == 11) {
+ QStringList tags;
+ tags << "highway=motorway" << "highway=motorway_link";
+ tags << "highway=trunk" << "highway=trunk_link";
+ tags << "highway=primary" << "highway=primary_link";
+ tags << "highway=secondary" << "highway=secondary_link";
+ tags << "leisure=nature_reserve";
+ tags << "leisure=park";
+ tags << "place=city";
+ tags << "place=town";
+ tags << "place=locality";
+ tags << "boundary=administrative";
+ tags << "boundary=political";
+ tags << "boundary=national_park";
+ tags << "boundary=protected_area";
+
+ TagsFilter tagsFilter(map, tags);
+
+ TinyPlanetProcessor processor(tagsFilter.accepted());
+ TinyPlanetProcessor background(mergeMap);
+ GeoDataDocument* landmass = background.clipTo(tagsFilter.accepted()->latLonAltBox());
+
+ TinyPlanetProcessor landMassClipper(landmass);
+
+ TileIterator iter(tagsFilter.accepted()->latLonAltBox(), zoomLevel);
+ foreach(auto const &tileId, iter) {
+ GeoDataDocument* tile1 = processor.cutToTiles(zoomLevel, tileId.x(), tileId.y());
+ GeoDataDocument* tile2 = landMassClipper.cutToTiles(zoomLevel, tileId.x(), tileId.y());
+ GeoDataDocument* combined = mergeDocuments(tile1, tile2);
+ NodeReducer reducer(combined, zoomLevel);
+ reducer.process();
+ if (!writeTile(parser, outputName, combined, tileId.x(), tileId.y(), zoomLevel)) {
+ return 4;
+ }
+ qInfo() << tile1->name() << " done";
+ delete combined;
+ delete tile1;
+ delete tile2;
+ }
} else if(file.suffix() == QLatin1String("shp") && parser.isSet("cut-to-tiles")) {
ShpCoastlineProcessor processor(map);
processor.process();