1 #ifndef OSMSCOUT_IMPORT_PREPROCESS_H 2 #define OSMSCOUT_IMPORT_PREPROCESS_H 25 #include <unordered_map> 63 std::vector<RawCoord> rawCoords;
64 std::vector<RawNode> rawNodes;
65 std::vector<RawWay> rawWays;
66 std::vector<RawCoastline> rawCoastlines;
67 std::vector<RawCoastline> rawDatapolygon;
68 std::vector<RawRelation> multipolygons;
69 std::vector<TurnRestriction> turnRestriction;
70 std::vector<RawRelation> routeMasters;
71 std::vector<RawRelation> routes;
75 typedef std::shared_ptr<ProcessedData> ProcessedDataRef;
79 const ImportParameter& parameter;
83 std::vector<std::thread> blockWorkerThreads;
85 std::thread writeWorkerThread;
87 FileWriter rawCoordWriter;
88 FileWriter nodeWriter;
90 FileWriter coastlineWriter;
91 FileWriter datapolygonWriter;
92 FileWriter turnRestrictionWriter;
93 FileWriter multipolygonWriter;
94 FileWriter routeMasterWriter;
95 FileWriter routeWriter;
105 uint32_t relationCount;
106 uint32_t coastlineCount;
107 uint32_t datapolygonCount;
108 uint32_t turnRestrictionCount;
109 uint32_t multipolygonCount;
110 uint32_t routeMasterCount;
115 OSMId lastRelationId;
124 bool nodeSortingError;
125 bool waySortingError;
126 bool relationSortingError;
131 std::vector<uint32_t> nodeStat;
132 std::vector<uint32_t> areaStat;
133 std::vector<uint32_t> wayStat;
134 std::vector<uint32_t> relStat;
137 bool IsTurnRestriction(
const TagMap& tags,
138 TurnRestriction::Type& type)
const;
141 bool IsMultipolygon(
const TagMap& tags,
144 bool IsRouteMaster(
const TagMap& tags,
147 bool IsRoute(
const TagMap& tags,
150 bool DumpDistribution();
151 bool DumpBoundingBox();
153 void NodeSubTask(
const RawNodeData& data,
154 ProcessedData& processed);
155 void WaySubTask(
const RawWayData& data,
156 ProcessedData& processed);
157 void TurnRestrictionSubTask(
const std::vector<RawRelation::Member>& members,
158 TurnRestriction::Type type,
159 ProcessedData& processed);
160 void MultipolygonSubTask(
const TagMap& tags,
161 const std::vector<RawRelation::Member>& members,
164 ProcessedData& processed);
165 void RouteMasterSubTask(
const TagMap& tags,
166 const std::vector<RawRelation::Member>& members,
169 ProcessedData& processed);
170 void RouteSubTask(
const TagMap& tags,
171 const std::vector<RawRelation::Member>& members,
174 ProcessedData& processed);
175 void RelationSubTask(
const RawRelationData& data,
176 ProcessedData& processed);
178 ProcessedDataRef BlockTask(
const RawBlockDataRef& data);
179 void BlockWorkerLoop();
181 void WriteTask(std::shared_future<ProcessedDataRef>& processed);
182 void WriteWorkerLoop();
186 const ImportParameter& parameter,
191 void ProcessBlock(RawBlockDataRef data)
override;
193 bool Cleanup(
bool success);
198 const ImportParameter& parameter,
203 void GetDescription(
const ImportParameter& parameter,
204 ImportModuleDescription& description)
const override;
207 const ImportParameter& parameter,
static const char *const RAWCOASTLINE_DAT
Definition: Preprocess.h:51
static const char *const RAWCOORDS_DAT
Definition: Preprocess.h:47
int64_t OSMId
Definition: OSMScoutTypes.h:34
static const char *const RAWTURNRESTR_DAT
Definition: Preprocess.h:53
#define CLASS_FINAL
Definition: Compiler.h:26
Setup internal state of renderer for executing next steps with current projection and parameters...
Definition: MapPainter.h:57
Definition: Preprocessor.h:35
static const char *const RAWROUTEMASTER_DAT
Definition: Preprocess.h:54
static const char *const RAWNODES_DAT
Definition: Preprocess.h:48
static const char *const RAWROUTE_DAT
Definition: Preprocess.h:55
static const char *const RAWRELS_DAT
Definition: Preprocess.h:50
static const char *const RAWWAYS_DAT
Definition: Preprocess.h:49
std::shared_ptr< TypeInfo > TypeInfoRef
Definition: TypeConfig.h:58
static const char *const RAWDATAPOLYGON_DAT
Definition: Preprocess.h:52
std::unordered_map< TagId, std::string > TagMap
Definition: Tag.h:41
Definition: Progress.h:34
std::shared_ptr< TypeConfig > TypeConfigRef
Definition: TypeConfig.h:1227