summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-11 06:22:06 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-11 06:22:06 (GMT)
commit87638c5d8c364774864d0c4ccf71e3074374b9d4 (patch)
tree2acf3b168f2a2868068e822df47fb3a380c361cb
parentb2e184c04e552739c5cf0249264dc25a6c643538 (diff)
Rename TinyPlanetProcessor VectorClipper
-rw-r--r--tools/vectorosm-tilecreator/CMakeLists.txt2
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.cpp (renamed from tools/vectorosm-tilecreator/TinyPlanetProcessor.cpp)14
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.h (renamed from tools/vectorosm-tilecreator/TinyPlanetProcessor.h)4
-rw-r--r--tools/vectorosm-tilecreator/main.cpp12
4 files changed, 16 insertions, 16 deletions
diff --git a/tools/vectorosm-tilecreator/CMakeLists.txt b/tools/vectorosm-tilecreator/CMakeLists.txt
index 93e6ec4..dba385c 100644
--- a/tools/vectorosm-tilecreator/CMakeLists.txt
+++ b/tools/vectorosm-tilecreator/CMakeLists.txt
@@ -26,10 +26,10 @@ set( ${TARGET}_SRC
main.cpp
BaseClipper.cpp
BaseFilter.cpp
-TinyPlanetProcessor.cpp
NodeReducer.cpp
TagsFilter.cpp
TileIterator.cpp
+VectorClipper.cpp
WayConcatenator.cpp
WayChunk.cpp
)
diff --git a/tools/vectorosm-tilecreator/TinyPlanetProcessor.cpp b/tools/vectorosm-tilecreator/VectorClipper.cpp
index 3f47715..9770833 100644
--- a/tools/vectorosm-tilecreator/TinyPlanetProcessor.cpp
+++ b/tools/vectorosm-tilecreator/VectorClipper.cpp
@@ -8,7 +8,7 @@
// Copyright 2016 David Kolozsvari <freedawson@gmail.com>
//
-#include "TinyPlanetProcessor.h"
+#include "VectorClipper.h"
#include "BaseClipper.h"
#include "TileId.h"
@@ -23,18 +23,18 @@
namespace Marble {
-TinyPlanetProcessor::TinyPlanetProcessor(GeoDataDocument* document) :
+VectorClipper::VectorClipper(GeoDataDocument* document) :
BaseFilter(document)
{
}
-void TinyPlanetProcessor::process()
+void VectorClipper::process()
{
// ?
}
-GeoDataDocument *TinyPlanetProcessor::clipTo(const GeoDataLatLonBox &tileBoundary)
+GeoDataDocument *VectorClipper::clipTo(const GeoDataLatLonBox &tileBoundary)
{
GeoDataDocument* tile = new GeoDataDocument();
BaseClipper clipper;
@@ -171,7 +171,7 @@ GeoDataDocument *TinyPlanetProcessor::clipTo(const GeoDataLatLonBox &tileBoundar
return tile;
}
-GeoDataDocument *TinyPlanetProcessor::clipTo(unsigned int zoomLevel, unsigned int tileX, unsigned int tileY)
+GeoDataDocument *VectorClipper::clipTo(unsigned int zoomLevel, unsigned int tileX, unsigned int tileY)
{
unsigned int N = pow(2, zoomLevel);
GeoDataLatLonBox tileBoundary;
@@ -188,12 +188,12 @@ GeoDataDocument *TinyPlanetProcessor::clipTo(unsigned int zoomLevel, unsigned in
return tile;
}
-void TinyPlanetProcessor::copyTags(const GeoDataPlacemark &source, GeoDataPlacemark &target) const
+void VectorClipper::copyTags(const GeoDataPlacemark &source, GeoDataPlacemark &target) const
{
copyTags(source.osmData(), target.osmData());
}
-void TinyPlanetProcessor::copyTags(const OsmPlacemarkData &originalPlacemarkData, OsmPlacemarkData &targetOsmData) const
+void VectorClipper::copyTags(const OsmPlacemarkData &originalPlacemarkData, OsmPlacemarkData &targetOsmData) const
{
for (auto iter=originalPlacemarkData.tagsBegin(), end=originalPlacemarkData.tagsEnd(); iter != end; ++iter) {
targetOsmData.addTag(iter.key(), iter.value());
diff --git a/tools/vectorosm-tilecreator/TinyPlanetProcessor.h b/tools/vectorosm-tilecreator/VectorClipper.h
index 5f2bee9..763597c 100644
--- a/tools/vectorosm-tilecreator/TinyPlanetProcessor.h
+++ b/tools/vectorosm-tilecreator/VectorClipper.h
@@ -18,10 +18,10 @@
namespace Marble {
-class TinyPlanetProcessor : public BaseFilter
+class VectorClipper : public BaseFilter
{
public:
- explicit TinyPlanetProcessor(GeoDataDocument* document);
+ explicit VectorClipper(GeoDataDocument* document);
void process() override;
diff --git a/tools/vectorosm-tilecreator/main.cpp b/tools/vectorosm-tilecreator/main.cpp
index 7946446..d18ce90 100644
--- a/tools/vectorosm-tilecreator/main.cpp
+++ b/tools/vectorosm-tilecreator/main.cpp
@@ -23,7 +23,7 @@
#include <QMessageLogContext>
-#include "TinyPlanetProcessor.h"
+#include "VectorClipper.h"
#include "NodeReducer.h"
#include "WayConcatenator.h"
#include "TileIterator.h"
@@ -210,7 +210,7 @@ int main(int argc, char *argv[])
qDebug() << "Landmass file " << outputFile << " done";
} else if (zoomLevel < 11) {
- TinyPlanetProcessor processor(map);
+ VectorClipper processor(map);
processor.process();
GeoDataLatLonBox world(85.0, -85.0, 180.0, -180.0, GeoDataCoordinates::Degree);
TileIterator iter(world, zoomLevel);
@@ -243,11 +243,11 @@ int main(int argc, char *argv[])
TagsFilter tagsFilter(map, tags);
- TinyPlanetProcessor processor(tagsFilter.accepted());
- TinyPlanetProcessor background(mergeMap);
+ VectorClipper processor(tagsFilter.accepted());
+ VectorClipper background(mergeMap);
GeoDataDocument* landmass = background.clipTo(tagsFilter.accepted()->latLonAltBox());
- TinyPlanetProcessor landMassClipper(landmass);
+ VectorClipper landMassClipper(landmass);
TileIterator iter(tagsFilter.accepted()->latLonAltBox(), zoomLevel);
foreach(auto const &tileId, iter) {
@@ -265,7 +265,7 @@ int main(int argc, char *argv[])
delete tile2;
}
} else if (file.suffix() == QLatin1String("osm") && parser.isSet("cut-to-tiles")) {
- TinyPlanetProcessor processor(map);
+ VectorClipper processor(map);
processor.process();