1#ifndef OSMSCOUT_IMPORT_PREPROCESS_H
2#define OSMSCOUT_IMPORT_PREPROCESS_H
25#include <unordered_map>
64 std::vector<RawCoord> rawCoords;
65 std::vector<RawNode> rawNodes;
66 std::vector<RawWay> rawWays;
67 std::vector<RawCoastline> rawCoastlines;
68 std::vector<RawCoastline> rawDatapolygon;
69 std::vector<RawRelation> multipolygons;
70 std::vector<TurnRestriction> turnRestriction;
71 std::vector<RawRelation> routeMasters;
72 std::vector<RawRelation>
routes;
76 typedef std::shared_ptr<ProcessedData> ProcessedDataRef;
84 std::vector<std::thread> blockWorkerThreads;
86 std::thread writeWorkerThread;
106 uint32_t relationCount;
107 uint32_t coastlineCount;
108 uint32_t datapolygonCount;
109 uint32_t turnRestrictionCount;
110 uint32_t multipolygonCount;
111 uint32_t routeMasterCount;
116 OSMId lastRelationId;
125 bool nodeSortingError;
126 bool waySortingError;
127 bool relationSortingError;
132 std::vector<uint32_t> nodeStat;
133 std::vector<uint32_t> areaStat;
134 std::vector<uint32_t> wayStat;
135 std::vector<uint32_t> relStat;
138 bool IsTurnRestriction(
const TagMap& tags,
139 TurnRestriction::Type&
type)
const;
151 bool DumpDistribution();
152 bool DumpBoundingBox();
154 void NodeSubTask(
const RawNodeData&
data,
155 ProcessedData& processed);
156 void WaySubTask(
const RawWayData&
data,
157 ProcessedData& processed);
158 void TurnRestrictionSubTask(
const std::vector<RawRelation::Member>& members,
159 TurnRestriction::Type
type,
160 ProcessedData& processed);
161 void MultipolygonSubTask(
const TagMap& tags,
162 const std::vector<RawRelation::Member>& members,
165 ProcessedData& processed);
166 void RouteMasterSubTask(
const TagMap& tags,
167 const std::vector<RawRelation::Member>& members,
170 ProcessedData& processed);
171 void RouteSubTask(
const TagMap& tags,
172 const std::vector<RawRelation::Member>& members,
175 ProcessedData& processed);
176 void RelationSubTask(
const RawRelationData&
data,
177 ProcessedData& processed);
179 ProcessedDataRef BlockTask(
const RawBlockDataRef&
data);
180 void BlockWorkerLoop();
182 void WriteTask(std::shared_future<ProcessedDataRef>& processed);
183 void WriteWorkerLoop();
192 void ProcessBlock(RawBlockDataRef
data)
override;
194 bool Cleanup(
bool success);
199 const ImportParameter& parameter,
205 ImportModuleDescription& description)
const override;
void GetDescription(const ImportParameter ¶meter, ImportModuleDescription &description) const override
bool IsRoute() const
Definition TypeConfig.h:615
std::vector< RouteRef > routes
Routes as retrieved from db.
Definition MapData.h:51
static const char *const RAWROUTE_DAT
Definition Preprocess.h:56
static const char *const RAWRELS_DAT
Definition Preprocess.h:51
static const char *const RAWDATAPOLYGON_DAT
Definition Preprocess.h:53
static const char *const RAWCOORDS_DAT
Definition Preprocess.h:48
static const char *const RAWCOASTLINE_DAT
Definition Preprocess.h:52
static const char *const RAWTURNRESTR_DAT
Definition Preprocess.h:54
bool IsMultipolygon() const
Definition TypeConfig.h:605
bool IsRouteMaster() const
Definition TypeConfig.h:610
static const char *const RAWROUTEMASTER_DAT
Definition Preprocess.h:55
bool Import(const TypeConfigRef &typeConfig, const ImportParameter ¶meter, Progress &progress) override
Type type
The type of the cell.
Definition GroundTile.h:92
static const char *const RAWNODES_DAT
Definition Preprocess.h:49
static const char *const RAWWAYS_DAT
Definition Preprocess.h:50
RoutableObjectsRef data
Definition DataAgent.h:63
Definition ImportModule.h:101
Definition Preprocessor.h:36
Definition WorkQueue.h:37
int64_t OSMId
Definition OSMScoutTypes.h:33
std::shared_ptr< TypeConfig > TypeConfigRef
Definition TypeConfig.h:1396
std::unordered_map< TagId, std::string > TagMap
Definition Tag.h:41
@ Initialize
Definition MapPainter.h:66
std::shared_ptr< TypeInfo > TypeInfoRef
Definition TypeConfig.h:61