summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-07 20:42:50 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-11-07 20:42:50 (GMT)
commit1c51fa07f4845b3b0a9adee30fde78499aa6ee33 (patch)
treebf104a0021da679c7ea8f540a173e613a702cef5
parenta37f54add5c53e09afd0d3ff11cc492f56f99f83 (diff)
Keep osm ids of ways and areas.
Note that due to clipping, this results in duplicated ids across several tiles were the geometry differs until all features with the same id have their geometries merged.
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.cpp1
-rw-r--r--tools/vectorosm-tilecreator/VectorClipper.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/tools/vectorosm-tilecreator/VectorClipper.cpp b/tools/vectorosm-tilecreator/VectorClipper.cpp
index 49c3622..b28c332 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.cpp
+++ b/tools/vectorosm-tilecreator/VectorClipper.cpp
@@ -363,6 +363,7 @@ void VectorClipper::clipPolygon(const GeoDataPlacemark *placemark, const Clipper
GeoDataPolygon* newPolygon = new GeoDataPolygon;
newPolygon->setOuterBoundary(outerRing);
newPlacemark->setGeometry(newPolygon);
+ newPlacemark->osmData().setId(osmData.id());
OsmObjectManager::initializeOsmData(newPlacemark);
copyTags(*placemark, *newPlacemark);
copyTags(osmData.memberReference(index), newPlacemark->osmData().memberReference(index));
diff --git a/tools/vectorosm-tilecreator/VectorClipper.h b/tools/vectorosm-tilecreator/VectorClipper.h
index 5e14d3d..6cd9451 100644
--- a/tools/vectorosm-tilecreator/VectorClipper.h
+++ b/tools/vectorosm-tilecreator/VectorClipper.h
@@ -82,6 +82,7 @@ private:
}
newPlacemark->setGeometry(newRing);
+ newPlacemark->osmData().setId(placemark->osmData().id());
copyTags(*placemark, *newPlacemark);
OsmObjectManager::initializeOsmData(newPlacemark);
document->append(newPlacemark);