libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout-import
include
osmscoutimport
RawCoastline.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_IMPORT_RAWCOASTLINE_H
2
#define OSMSCOUT_IMPORT_RAWCOASTLINE_H
3
4
/*
5
This source is part of the libosmscout library
6
Copyright (C) 2012 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 <memory>
24
25
#include <
osmscout/Tag.h
>
26
27
#include <
osmscout/io/FileScanner.h
>
28
#include <
osmscout/io/FileWriter.h
>
29
30
#include <
osmscout/system/Compiler.h
>
31
32
namespace
osmscout
{
33
34
class
RawCoastline
CLASS_FINAL
35
{
36
private
:
37
// Attribute availability flags (for optimized attribute storage)
38
39
static
const
uint8_t isArea = 1 << 0;
40
41
private
:
42
OSMId
id
{};
43
mutable
uint8_t flags=0;
44
std::vector<OSMId> nodes;
45
46
public
:
47
48
public
:
49
RawCoastline
() =
default
;
50
51
inline
OSMId
GetId
()
const
52
{
53
return
id
;
54
}
55
56
inline
bool
IsArea
()
const
57
{
58
return
(flags & isArea)!=0;
59
}
60
61
inline
const
std::vector<OSMId>&
GetNodes
()
const
62
{
63
return
nodes
;
64
}
65
66
inline
size_t
GetNodeCount
()
const
67
{
68
return
nodes
.size();
69
}
70
71
inline
OSMId
GetNodeId
(
size_t
idx)
const
72
{
73
return
nodes
[idx];
74
}
75
76
void
SetId
(
OSMId
id
);
77
void
SetType
(
bool
area);
78
void
SetNodes
(
const
std::vector<OSMId>&
nodes
);
79
80
void
Read
(
FileScanner
& scanner);
81
void
Write
(
FileWriter
& writer)
const
;
82
};
83
84
using
RawCoastlineRef
= std::shared_ptr<RawCoastline>;
85
}
86
87
#endif
Compiler.h
FileScanner.h
FileWriter.h
Tag.h
osmscout::CLASS_FINAL
Definition
Area.h:88
osmscout::CLASS_FINAL::SetNodes
void SetNodes(const std::vector< OSMId > &nodes)
osmscout::CLASS_FINAL::SetType
void SetType(bool area)
osmscout::CLASS_FINAL::Read
void Read(FileScanner &scanner)
osmscout::CLASS_FINAL::nodes
std::vector< Point > nodes
List of nodes.
Definition
Way.h:57
osmscout::CLASS_FINAL::GetNodeCount
size_t GetNodeCount() const
Definition
RawCoastline.h:66
osmscout::CLASS_FINAL::GetId
OSMId GetId() const
Definition
RawCoastline.h:51
osmscout::CLASS_FINAL::GetNodeId
OSMId GetNodeId(size_t idx) const
Definition
RawCoastline.h:71
osmscout::CLASS_FINAL::id
OSMId id
We are an area.
Definition
ObjectRef.h:49
osmscout::CLASS_FINAL::IsArea
bool IsArea() const
Definition
RawCoastline.h:56
osmscout::CLASS_FINAL::FileScanner
FileScanner()=default
osmscout::CLASS_FINAL::GetNodes
const std::vector< OSMId > & GetNodes() const
Definition
RawCoastline.h:61
osmscout::CLASS_FINAL::FileWriter
FileWriter()=default
osmscout::CLASS_FINAL::RawCoastline
RawCoastline()=default
osmscout::CLASS_FINAL::SetId
void SetId(OSMId id)
osmscout::CLASS_FINAL::Write
void Write(FileWriter &writer) const
osmscout::OSMId
int64_t OSMId
Definition
OSMScoutTypes.h:33
osmscout
Definition
Area.h:39
osmscout::RawCoastlineRef
std::shared_ptr< RawCoastline > RawCoastlineRef
Definition
RawCoastline.h:84
Generated by
1.17.0