summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-04 09:36:10 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-04 09:36:10 (GMT)
commit7eee1fb78880a9267ddffc88db88d2ae51cea5b6 (patch)
treecc4967ca8513b898ebfc8f99f9029688eb889268
parent9aa7bce70fef178a0ab260a9cd761edfb5e35d85 (diff)
Add processing steps for lower level tiles (0-9)
- cut to tiles - reduce number of nodes
-rw-r--r--tools/vectorosm-tilecreator/main.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/vectorosm-tilecreator/main.cpp b/tools/vectorosm-tilecreator/main.cpp
index a9c5a6c..a5b6ded 100644
--- a/tools/vectorosm-tilecreator/main.cpp
+++ b/tools/vectorosm-tilecreator/main.cpp
@@ -182,7 +182,23 @@ int main(int argc, char *argv[])
mergeMap = manager.openFile(mergeFileName, DocumentRole::MapDocument, 600000);
}
- if(file.suffix() == QLatin1String("shp") && parser.isSet("cut-to-tiles")) {
+ if (zoomLevel < 11) {
+ TinyPlanetProcessor processor(map);
+ processor.process();
+ GeoDataLatLonBox world(85.0, -85.0, 180.0, -180.0, GeoDataCoordinates::Degree);
+ TileIterator iter(world, zoomLevel);
+ foreach(auto const &tileId, iter) {
+ GeoDataDocument* tile = processor.cutToTiles(zoomLevel, tileId.x(), tileId.y());
+ NodeReducer reducer(tile, zoomLevel);
+ reducer.process();
+
+ if (!writeTile(parser, outputName, tile, tileId.x(), tileId.y(), zoomLevel)) {
+ return 4;
+ }
+ qInfo() << tile->name() << " done";
+ delete tile;
+ }
+ } else if(file.suffix() == QLatin1String("shp") && parser.isSet("cut-to-tiles")) {
ShpCoastlineProcessor processor(map);
processor.process();
GeoDataLatLonBox world(85.0, -85.0, 180.0, -180.0, GeoDataCoordinates::Degree);