summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-15 19:02:33 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-11-15 19:02:54 (GMT)
commit84026e1b2c64e018ebc452bcb1bd08b53ae36a55 (patch)
tree985bc2c056927809da43c5105d4626e2154a9027
parent312ae71d42e534cd4a5a36619b12c0b7f03b3adc (diff)
Keep category and visibility info. Remove wrong check.
-rw-r--r--tools/vectorosm-tilecreator/NodeReducer.cpp3
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.cpp2
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.h4
3 files changed, 5 insertions, 4 deletions
diff --git a/tools/vectorosm-tilecreator/NodeReducer.cpp b/tools/vectorosm-tilecreator/NodeReducer.cpp
index f3b2d7c..38ccbbc 100644
--- a/tools/vectorosm-tilecreator/NodeReducer.cpp
+++ b/tools/vectorosm-tilecreator/NodeReducer.cpp
@@ -29,9 +29,6 @@ NodeReducer::NodeReducer(GeoDataDocument* document, int zoomLevel) :
m_remainingNodes(0)
{
foreach (GeoDataPlacemark* placemark, placemarks()) {
- if (placemark->visualCategory() == GeoDataPlacemark::None) {
- continue;
- }
GeoDataGeometry const * const geometry = placemark->geometry();
if(geometry->nodeType() == GeoDataTypes::GeoDataLineStringType) {
GeoDataLineString const * prevLine = static_cast<GeoDataLineString const *>(geometry);
diff --git a/tools/vectorosm-tilecreator/VectorClipper.cpp b/tools/vectorosm-tilecreator/VectorClipper.cpp
index 95199b7..001e67f 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.cpp
+++ b/tools/vectorosm-tilecreator/VectorClipper.cpp
@@ -436,6 +436,8 @@ void VectorClipper::clipPolygon(const GeoDataPlacemark *placemark, const Clipper
clipper.Execute(ctIntersection, paths);
foreach(const auto &path, paths) {
GeoDataPlacemark* newPlacemark = new GeoDataPlacemark;
+ newPlacemark->setVisible(placemark->isVisible());
+ newPlacemark->setVisualCategory(placemark->visualCategory());
GeoDataLinearRing outerRing;
OsmPlacemarkData const & placemarkOsmData = placemark->osmData();
OsmPlacemarkData & newPlacemarkOsmData = newPlacemark->osmData();
diff --git a/tools/vectorosm-tilecreator/VectorClipper.h b/tools/vectorosm-tilecreator/VectorClipper.h
index 683e4aa..05ccac0 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.h
+++ b/tools/vectorosm-tilecreator/VectorClipper.h
@@ -74,7 +74,9 @@ private:
OpenPathsFromPolyTree(tree, paths);
}
foreach(const auto &path, paths) {
- GeoDataPlacemark* newPlacemark = new GeoDataPlacemark();
+ GeoDataPlacemark* newPlacemark = new GeoDataPlacemark;
+ newPlacemark->setVisible(placemark->isVisible());
+ newPlacemark->setVisualCategory(placemark->visualCategory());
T* newRing = new T;
QVector<int> borderPoints;
int index = 0;