summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-11 06:25:59 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-11 06:25:59 (GMT)
commita5b4a52012715ff01015e20df74500733779ebe9 (patch)
treefe080d594581e99db79644ef192ab6965ab355df
parent87638c5d8c364774864d0c4ccf71e3074374b9d4 (diff)
Don't enforce a pure virtual method that does not fit well
-rw-r--r--tools/vectorosm-tilecreator/BaseFilter.h2
-rw-r--r--tools/vectorosm-tilecreator/NodeReducer.cpp5
-rw-r--r--tools/vectorosm-tilecreator/NodeReducer.h1
-rw-r--r--tools/vectorosm-tilecreator/TagsFilter.cpp5
-rw-r--r--tools/vectorosm-tilecreator/TagsFilter.h1
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.cpp5
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.h2
-rw-r--r--tools/vectorosm-tilecreator/WayConcatenator.cpp15
-rw-r--r--tools/vectorosm-tilecreator/WayConcatenator.h1
-rw-r--r--tools/vectorosm-tilecreator/main.cpp8
10 files changed, 5 insertions, 40 deletions
diff --git a/tools/vectorosm-tilecreator/BaseFilter.h b/tools/vectorosm-tilecreator/BaseFilter.h
index f6074c0..d19479b 100644
--- a/tools/vectorosm-tilecreator/BaseFilter.h
+++ b/tools/vectorosm-tilecreator/BaseFilter.h
@@ -26,8 +26,6 @@ public:
explicit BaseFilter(GeoDataDocument* document);
virtual ~BaseFilter();
- virtual void process() = 0;
-
const QVector<GeoDataPlacemark*> & placemarks() const;
QVector<GeoDataPlacemark*> & placemarks();
diff --git a/tools/vectorosm-tilecreator/NodeReducer.cpp b/tools/vectorosm-tilecreator/NodeReducer.cpp
index 09399ff..2fb1851 100644
--- a/tools/vectorosm-tilecreator/NodeReducer.cpp
+++ b/tools/vectorosm-tilecreator/NodeReducer.cpp
@@ -27,11 +27,6 @@ NodeReducer::NodeReducer(GeoDataDocument* document, int zoomLevel) :
m_removedNodes(0),
m_remainingNodes(0)
{
- // nothing to do
-}
-
-void NodeReducer::process()
-{
foreach (GeoDataPlacemark* placemark, placemarks()) {
if(placemark->geometry()->nodeType() == GeoDataTypes::GeoDataLineStringType) {
diff --git a/tools/vectorosm-tilecreator/NodeReducer.h b/tools/vectorosm-tilecreator/NodeReducer.h
index a01b4be..41f287b 100644
--- a/tools/vectorosm-tilecreator/NodeReducer.h
+++ b/tools/vectorosm-tilecreator/NodeReducer.h
@@ -20,7 +20,6 @@ namespace Marble {
class NodeReducer : public BaseFilter {
public:
NodeReducer(GeoDataDocument* document, int zoomLevel);
- void process() override;
private:
template<class T>
diff --git a/tools/vectorosm-tilecreator/TagsFilter.cpp b/tools/vectorosm-tilecreator/TagsFilter.cpp
index f536c4d..7a03136 100644
--- a/tools/vectorosm-tilecreator/TagsFilter.cpp
+++ b/tools/vectorosm-tilecreator/TagsFilter.cpp
@@ -83,11 +83,6 @@ TagsFilter::~TagsFilter()
qDeleteAll(m_rejectedObjects);
}
-void TagsFilter::process()
-{
- //does nothing
-}
-
QVector<GeoDataPlacemark*>::const_iterator TagsFilter::rejectedObjectsBegin() const
{
return m_rejectedObjects.begin();
diff --git a/tools/vectorosm-tilecreator/TagsFilter.h b/tools/vectorosm-tilecreator/TagsFilter.h
index a2f2701..505a697 100644
--- a/tools/vectorosm-tilecreator/TagsFilter.h
+++ b/tools/vectorosm-tilecreator/TagsFilter.h
@@ -28,7 +28,6 @@ public:
TagsFilter(GeoDataDocument* document, const QStringList& tagsList, bool andFlag = false);
~TagsFilter();
- void process() override;
QVector<GeoDataPlacemark*>::const_iterator rejectedObjectsBegin() const;
QVector<GeoDataPlacemark*>::const_iterator rejectedObjectsEnd() const;
diff --git a/tools/vectorosm-tilecreator/VectorClipper.cpp b/tools/vectorosm-tilecreator/VectorClipper.cpp
index 9770833..fb0af9f 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.cpp
+++ b/tools/vectorosm-tilecreator/VectorClipper.cpp
@@ -29,11 +29,6 @@ VectorClipper::VectorClipper(GeoDataDocument* document) :
}
-void VectorClipper::process()
-{
- // ?
-}
-
GeoDataDocument *VectorClipper::clipTo(const GeoDataLatLonBox &tileBoundary)
{
GeoDataDocument* tile = new GeoDataDocument();
diff --git a/tools/vectorosm-tilecreator/VectorClipper.h b/tools/vectorosm-tilecreator/VectorClipper.h
index 763597c..9be52bb 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.h
+++ b/tools/vectorosm-tilecreator/VectorClipper.h
@@ -23,8 +23,6 @@ class VectorClipper : public BaseFilter
public:
explicit VectorClipper(GeoDataDocument* document);
- void process() override;
-
GeoDataDocument* clipTo(const GeoDataLatLonBox &box);
GeoDataDocument* clipTo(unsigned int zoomLevel, unsigned int tileX, unsigned int tileY);
diff --git a/tools/vectorosm-tilecreator/WayConcatenator.cpp b/tools/vectorosm-tilecreator/WayConcatenator.cpp
index 796b971..9021365 100644
--- a/tools/vectorosm-tilecreator/WayConcatenator.cpp
+++ b/tools/vectorosm-tilecreator/WayConcatenator.cpp
@@ -25,16 +25,6 @@ namespace Marble {
WayConcatenator::WayConcatenator(GeoDataDocument *document, const QStringList &tagsList, bool andFlag) : TagsFilter(document, tagsList, andFlag)
{
- // qDebug()<< "Entered WayConcatenator";
-}
-
-WayConcatenator::~WayConcatenator()
-{
- qDeleteAll(m_chunks);
-}
-
-void WayConcatenator::process()
-{
qint64 count = 0;
qint64 chunkCount = 0;
qint64 newCount = 0;
@@ -150,6 +140,11 @@ void WayConcatenator::process()
}
+WayConcatenator::~WayConcatenator()
+{
+ qDeleteAll(m_chunks);
+}
+
void WayConcatenator::addRejectedPlacemarks()
{
QVector<GeoDataPlacemark*>::const_iterator itr = rejectedObjectsBegin();
diff --git a/tools/vectorosm-tilecreator/WayConcatenator.h b/tools/vectorosm-tilecreator/WayConcatenator.h
index a6cf069..338e979 100644
--- a/tools/vectorosm-tilecreator/WayConcatenator.h
+++ b/tools/vectorosm-tilecreator/WayConcatenator.h
@@ -23,7 +23,6 @@ class WayConcatenator : public TagsFilter
public:
WayConcatenator(GeoDataDocument *document, const QStringList &tagsList, bool andFlag = false);
~WayConcatenator();
- void process() override;
private:
void createWayChunk(GeoDataPlacemark *placemark, qint64 firstId, qint64 lastId);
diff --git a/tools/vectorosm-tilecreator/main.cpp b/tools/vectorosm-tilecreator/main.cpp
index d18ce90..9efa84e 100644
--- a/tools/vectorosm-tilecreator/main.cpp
+++ b/tools/vectorosm-tilecreator/main.cpp
@@ -200,7 +200,6 @@ int main(int argc, char *argv[])
}
NodeReducer reducer(map, zoomLevel);
- reducer.process();
QString const extension = parser.value("extension");
QString const outputFile = QString("%1/landmass-level-%2.%3").arg(outputName).arg(zoomLevel).arg(extension);
@@ -211,13 +210,11 @@ int main(int argc, char *argv[])
} else if (zoomLevel < 11) {
VectorClipper 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.clipTo(zoomLevel, tileId.x(), tileId.y());
NodeReducer reducer(tile, zoomLevel);
- reducer.process();
if (!writeTile(parser, outputName, tile, tileId.x(), tileId.y(), zoomLevel)) {
return 4;
@@ -255,7 +252,6 @@ int main(int argc, char *argv[])
GeoDataDocument* tile2 = landMassClipper.clipTo(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;
}
@@ -267,8 +263,6 @@ int main(int argc, char *argv[])
} else if (file.suffix() == QLatin1String("osm") && parser.isSet("cut-to-tiles")) {
VectorClipper processor(map);
- processor.process();
-
GeoDataLatLonBox world(85.0, -85.0, 180.0, -180.0, GeoDataCoordinates::Degree);
//TileIterator iter(map->latLonAltBox(), zoomLevel);
TileIterator iter(world, zoomLevel);
@@ -288,7 +282,6 @@ int main(int argc, char *argv[])
}
else{
NodeReducer reducer(map, zoomLevel);
- reducer.process();
if (!GeoDataDocumentWriter::write(outputName, *map)) {
qDebug() << "Could not write the file " << outputName;
return 4;
@@ -304,7 +297,6 @@ int main(int argc, char *argv[])
//Filters and considers only those placemarks which have all the key-value pairs given at command line
WayConcatenator concatenator(map, tagsList, parser.isSet("tags-and"));
- concatenator.process();
qDebug()<<"Concatenation done, writing results to the file";