Changeset View
Changeset View
Standalone View
Standalone View
tools/osm-simplify/WayConcatenator.h
- This file was added.
1 | // | ||||
---|---|---|---|---|---|
2 | // This file is part of the Marble Virtual Globe. | ||||
3 | // | ||||
4 | // This program is free software licensed under the GNU LGPL. You can | ||||
5 | // find a copy of this license in LICENSE.txt in the top directory of | ||||
6 | // the source code. | ||||
7 | // | ||||
8 | // Copyright 2016 Akshat Tandon <akshat.tandon@research.iiit.ac.in> | ||||
9 | // | ||||
10 | | ||||
11 | #ifndef MARBLE_WAYCONCATENATOR_H | ||||
12 | #define MARBLE_WAYCONCATENATOR_H | ||||
13 | | ||||
14 | #include "PlacemarkFilter.h" | ||||
15 | #include "TagsFilter.h" | ||||
16 | | ||||
17 | namespace Marble | ||||
18 | { | ||||
19 | class WayChunk; | ||||
20 | | ||||
21 | class WayConcatenator : public TagsFilter | ||||
22 | { | ||||
23 | public: | ||||
24 | WayConcatenator(GeoDataDocument *document, const QStringList &tagsList, bool andFlag = false); | ||||
25 | virtual void process(); | ||||
26 | ~WayConcatenator(); | ||||
27 | private: | ||||
28 | QMultiHash<qint64, WayChunk*> m_hash; | ||||
29 | QVector<WayChunk*> m_chunks; | ||||
30 | QList<GeoDataPlacemark> m_placemarks; | ||||
31 | void createWayChunk(GeoDataPlacemark *placemark, qint64 firstId, qint64 lastId); | ||||
32 | WayChunk* getWayChunk(GeoDataPlacemark *placemark, qint64 matchId); | ||||
33 | void concatFirst(GeoDataPlacemark *placemark, WayChunk *chunk); | ||||
34 | void concatLast(GeoDataPlacemark *placemark, WayChunk *chunk); | ||||
35 | void concatBoth(GeoDataPlacemark *placemark, WayChunk *chunk, WayChunk *otherChunk); | ||||
36 | void addRejectedPlacemarks(); | ||||
37 | void addWayChunks(); | ||||
38 | void modifyDocument(); | ||||
39 | }; | ||||
40 | | ||||
41 | } | ||||
42 | | ||||
43 | #endif | ||||
44 | | ||||
45 | |