libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout-import
include
osmscoutimport
GenWayAreaDat.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_IMPORT_GENWAYAREADAT_H
2
#define OSMSCOUT_IMPORT_GENWAYAREADAT_H
3
4
/*
5
This source is part of the libosmscout library
6
Copyright (C) 2013 Tim Teulings
7
8
This library is free software; you can redistribute it and/or
9
modify it under the terms of the GNU Lesser General Public
10
License as published by the Free Software Foundation; either
11
version 2.1 of the License, or (at your option) any later version.
12
13
This library is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
Lesser General Public License for more details.
17
18
You should have received a copy of the GNU Lesser General Public
19
License along with this library; if not, write to the Free Software
20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
*/
22
23
#include <osmscoutimport/ImportFeatures.h>
24
25
#include <tuple>
26
#include <unordered_set>
27
28
#include <
osmscout/Area.h
>
29
30
#include <
osmscout/db/CoordDataFile.h
>
31
32
#include <
osmscout/TypeInfoSet.h
>
33
34
#include <
osmscout/routing/TurnRestriction.h
>
35
36
#include <
osmscoutimport/Import.h
>
37
#include <
osmscoutimport/RawWay.h
>
38
39
#include <
osmscout/system/Compiler.h
>
40
41
namespace
osmscout
{
42
43
class
WayAreaDataGenerator
CLASS_FINAL
:
public
ImportModule
44
{
45
public
:
46
static
const
char
*
WAYAREA_TMP
;
47
48
private
:
49
struct
Distribution
50
{
51
uint32_t nodeCount;
52
uint32_t wayCount;
53
uint32_t areaCount;
54
55
Distribution();
56
};
57
58
using
BlacklistSet = std::unordered_set<OSMId>;
59
using
WayList = std::list<RawWayRef>;
60
61
std::tuple<BlacklistSet,bool> ReadWayBlacklist(
const
ImportParameter& parameter,
62
Progress
& progress)
const
;
63
64
void
WriteArea(
const
ImportParameter& parameter,
65
Progress
& progress,
66
const
TypeConfig& typeConfig,
67
FileWriter& writer,
68
uint32_t& writtenWayCount,
69
const
CoordDataFile::ResultMap
& coordsMap,
70
const
RawWay& rawWay);
71
72
public
:
73
void
GetDescription
(
const
ImportParameter
& parameter,
74
ImportModuleDescription& description)
const override
;
75
76
bool
Import
(
const
TypeConfigRef
& typeConfig,
77
const
ImportParameter
& parameter,
78
Progress
& progress)
override
;
79
};
80
}
81
82
#endif
Area.h
Compiler.h
CoordDataFile.h
Import.h
RawWay.h
TurnRestriction.h
TypeInfoSet.h
osmscout::CLASS_FINAL
Definition
Area.h:88
osmscout::CLASS_FINAL::GetDescription
void GetDescription(const ImportParameter ¶meter, ImportModuleDescription &description) const override
osmscout::CLASS_FINAL::ImportParameter
ImportParameter()
osmscout::CLASS_FINAL::Import
bool Import(const TypeConfigRef &typeConfig, const ImportParameter ¶meter, Progress &progress) override
osmscout::CLASS_FINAL::WAYAREA_TMP
static const char * WAYAREA_TMP
Definition
GenWayAreaDat.h:46
osmscout::CoordDataFile::ResultMap
std::unordered_map< OSMId, Point > ResultMap
Definition
CoordDataFile.h:42
osmscout::ImportModule
Definition
ImportModule.h:101
osmscout::Progress
Definition
Progress.h:34
osmscout::Progress::Progress
Progress()
osmscout::TypeConfigRef
std::shared_ptr< TypeConfig > TypeConfigRef
Definition
TypeConfig.h:1396
osmscout
Definition
Area.h:39
Generated by
1.17.0