Commit f52af133 authored by Dennis Nienhüser's avatar Dennis Nienhüser
Browse files

Remove unused class

parent 50e1269a
......@@ -28,7 +28,6 @@ BaseClipper.cpp
BaseFilter.cpp
PlacemarkFilter.cpp
ShpCoastlineProcessor.cpp
LineStringProcessor.cpp
TinyPlanetProcessor.cpp
NodeReducer.cpp
TagsFilter.cpp
......
//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2016 David Kolozsvari <freedawson@gmail.com>
//
#include "LineStringProcessor.h"
#include "GeoDataPlacemark.h"
#include "GeoDataGeometry.h"
#include "GeoDataLineString.h"
namespace Marble {
LineStringProcessor::LineStringProcessor(GeoDataDocument* document) :
PlacemarkFilter(document)
{
QList<GeoDataPlacemark*> toRemove;
foreach (GeoDataPlacemark* placemark, placemarks()) {
if(placemark->geometry()->nodeType() != GeoDataTypes::GeoDataLineStringType) {
toRemove.append(placemark);
}
}
foreach (GeoDataPlacemark* placemark, toRemove) {
placemarks().removeOne(placemark);
}
}
void LineStringProcessor::process()
{
qDebug() << "Polylines to process: " << placemarks().size();
QList<GeoDataPlacemark*> polylinesToDrop;
foreach (GeoDataPlacemark* polyline, placemarks()) {
switch(polyline->visualCategory())
{
case GeoDataFeature::HighwayCycleway :
case GeoDataFeature::HighwayFootway :
case GeoDataFeature::HighwayLivingStreet :
case GeoDataFeature::HighwayPath :
case GeoDataFeature::HighwayPedestrian :
case GeoDataFeature::HighwayRoad :
case GeoDataFeature::HighwaySteps :
case GeoDataFeature::HighwayUnknown :
case GeoDataFeature::HighwayUnclassified :
polylinesToDrop.append(polyline);
break;
default:
break;
}
}
int removed = 0;
foreach (auto* polyline, polylinesToDrop) {
if(document()->removeOne(polyline)) {
++removed;
}
}
qDebug() << "Polylines dropped: " << removed;
qDebug() << document()->name();
}
}
//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2016 David Kolozsvari <freedawson@gmail.com>
//
#ifndef LINESTRINGHANDLER_H
#define LINESTRINGHANDLER_H
#include "PlacemarkFilter.h"
namespace Marble {
class LineStringProcessor : public PlacemarkFilter
{
public:
explicit LineStringProcessor(GeoDataDocument* document);
void process() override;
};
}
#endif // LINESTRINGHANDLER_H
......@@ -22,7 +22,6 @@
#include <QMessageLogContext>
#include "LineStringProcessor.h"
#include "ShpCoastlineProcessor.h"
#include "TinyPlanetProcessor.h"
#include "NodeReducer.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment