libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout-map
include
osmscoutmap
MapPainterStatistics.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_MAP_MAPPAINTERSTATISTICS_H
2
#define OSMSCOUT_MAP_MAPPAINTERSTATISTICS_H
3
4
/*
5
This source is part of the libosmscout-map library
6
Copyright (C) 2023 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 <
osmscoutmap/MapImportExport.h
>
24
25
#include <
osmscout/TypeConfig.h
>
26
27
#include <
osmscout/projection/Projection.h
>
28
29
#include <
osmscoutmap/MapParameter.h
>
30
#include <
osmscoutmap/MapData.h
>
31
#include <
osmscoutmap/StyleConfig.h
>
32
33
namespace
osmscout
{
34
35
class
OSMSCOUT_MAP_API
MapPainterStatistics
36
{
37
private
:
41
struct
OSMSCOUT_MAP_API
DataStatistic
42
{
43
TypeInfoRef
type;
44
size_t
objectCount=0;
45
size_t
nodeCount =0;
46
size_t
wayCount =0;
47
size_t
areaCount =0;
48
size_t
coordCount =0;
49
size_t
labelCount =0;
50
size_t
iconCount =0;
51
52
DataStatistic() =
default
;
53
};
54
55
private
:
56
void
DumpDataStatistics(
const
std::list<DataStatistic>& statistics);
57
58
std::list<DataStatistic> MapToSortedList(
const
std::unordered_map<TypeInfoRef,DataStatistic>& statistics);
59
60
void
DumpDataStatistics(
const
StyleConfig
& styleConfig,
61
const
Projection
& projection,
62
const
MapParameter& parameter,
63
const
MapData& data);
64
65
void
CalculateStatistics(
const
Projection
& projection,
66
const
MapParameter& parameter,
67
const
StyleConfig
& styleConfig,
68
const
NodeRef
& node,
69
DataStatistic& statistic);
70
71
void
CalculateStatistics(
const
Projection
& projection,
72
const
MapParameter& parameter,
73
const
StyleConfig
& styleConfig,
74
const
WayRef
& way,
75
DataStatistic& statistic);
76
77
void
CalculateStatistics(
const
Projection
& projection,
78
const
MapParameter& parameter,
79
const
StyleConfig
& styleConfig,
80
const
AreaRef
& area,
81
DataStatistic& statistic);
82
83
void
DumpStatisticWarnings(
const
MapParameter& parameter,
84
const
std::unordered_map<TypeInfoRef,DataStatistic>& statistics);
85
86
public
:
87
MapPainterStatistics
() =
default
;
88
89
void
DumpMapPainterStatistics
(
const
StyleConfig
& styleConfig,
90
const
Projection
& projection,
91
const
MapParameter& parameter,
92
const
MapData& data);
93
};
94
}
95
#endif
MapData.h
MapImportExport.h
OSMSCOUT_MAP_API
#define OSMSCOUT_MAP_API
Definition
MapImportExport.h:45
MapParameter.h
Projection.h
StyleConfig.h
TypeConfig.h
osmscout::MapPainterStatistics::DumpMapPainterStatistics
void DumpMapPainterStatistics(const StyleConfig &styleConfig, const Projection &projection, const MapParameter ¶meter, const MapData &data)
osmscout::MapPainterStatistics::MapPainterStatistics
MapPainterStatistics()=default
osmscout::Projection
Definition
Projection.h:46
osmscout::StyleConfig
Index selectors by type and level.
Definition
StyleConfig.h:552
osmscout
Definition
Area.h:39
osmscout::WayRef
std::shared_ptr< Way > WayRef
Definition
Way.h:213
osmscout::AreaRef
std::shared_ptr< Area > AreaRef
Definition
Area.h:360
osmscout::TypeInfoRef
std::shared_ptr< TypeInfo > TypeInfoRef
Definition
TypeConfig.h:61
osmscout::NodeRef
std::shared_ptr< Node > NodeRef
Definition
Node.h:125
Generated by
1.17.0