libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout-import
include
osmscoutimport
RawCoord.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_IMPORT_RAWCOORD_H
2
#define OSMSCOUT_IMPORT_RAWCOORD_H
3
4
/*
5
This source is part of the libosmscout library
6
Copyright (C) 2016 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 <
osmscout/GeoCoord.h
>
24
#include <
osmscout/TypeConfig.h
>
25
26
#include <
osmscout/io/FileScanner.h
>
27
#include <
osmscout/io/FileWriter.h
>
28
29
#include <
osmscout/system/Compiler.h
>
30
31
namespace
osmscout
{
32
37
class
RawCoord
CLASS_FINAL
38
{
39
private
:
40
OSMId
id;
//<! OSM id of the corresponding node
41
GeoCoord coord;
//<! The actual coordinate
42
43
public
:
44
RawCoord
();
45
49
inline
OSMId
GetOSMId
()
const
50
{
51
return
id
;
52
}
53
57
inline
const
GeoCoord
&
GetCoord
()
const
58
{
59
return
coord
;
60
}
61
65
inline
bool
IsIdentical
(
const
RawCoord
& other)
const
66
{
67
return
id
==other.id;
68
}
69
73
inline
bool
IsSame
(
const
RawCoord
& other)
const
74
{
75
return
coord
==other.coord;
76
}
77
81
inline
bool
IsEqual
(
const
RawCoord
& other)
const
82
{
83
return
id
==other.id ||
coord
==other.coord;
84
}
85
86
void
SetOSMId
(
OSMId
id
);
87
88
void
SetCoord
(
const
GeoCoord
&
coord
);
89
void
Read
(
const
TypeConfig
& typeConfig,
90
FileScanner
& scanner);
91
void
Write
(
const
TypeConfig
& typeConfig,
92
FileWriter
& writer)
const
;
93
void
Write
(
FileWriter
& writer)
const
;
94
};
95
96
using
RawCoordRef
= std::shared_ptr<RawCoord>;
97
}
98
99
#endif
Compiler.h
FileScanner.h
FileWriter.h
GeoCoord.h
TypeConfig.h
osmscout::CLASS_FINAL
Definition
Area.h:88
osmscout::CLASS_FINAL::coord
const GeoCoord coord
Definition
RouteStateAgent.h:49
osmscout::CLASS_FINAL::IsSame
bool IsSame(const RawCoord &other) const
Definition
RawCoord.h:73
osmscout::CLASS_FINAL::SetCoord
void SetCoord(const GeoCoord &coord)
osmscout::CLASS_FINAL::TypeConfig
TypeConfig()
osmscout::CLASS_FINAL::Write
void Write(const TypeConfig &typeConfig, FileWriter &writer) const
osmscout::CLASS_FINAL::RawCoord
RawCoord()
osmscout::CLASS_FINAL::GetOSMId
OSMId GetOSMId() const
Definition
RawCoord.h:49
osmscout::CLASS_FINAL::id
OSMId id
We are an area.
Definition
ObjectRef.h:49
osmscout::CLASS_FINAL::GeoCoord
GeoCoord()=default
osmscout::CLASS_FINAL::FileScanner
FileScanner()=default
osmscout::CLASS_FINAL::FileWriter
FileWriter()=default
osmscout::CLASS_FINAL::SetOSMId
void SetOSMId(OSMId id)
osmscout::CLASS_FINAL::IsEqual
bool IsEqual(const RawCoord &other) const
Definition
RawCoord.h:81
osmscout::CLASS_FINAL::Write
void Write(FileWriter &writer) const
osmscout::CLASS_FINAL::GetCoord
const GeoCoord & GetCoord() const
Definition
RawCoord.h:57
osmscout::CLASS_FINAL::IsIdentical
bool IsIdentical(const RawCoord &other) const
Definition
RawCoord.h:65
osmscout::CLASS_FINAL::Read
void Read(const TypeConfig &typeConfig, FileScanner &scanner)
osmscout::OSMId
int64_t OSMId
Definition
OSMScoutTypes.h:33
osmscout
Definition
Area.h:39
osmscout::RawCoordRef
std::shared_ptr< RawCoord > RawCoordRef
Definition
RawCoord.h:96
Generated by
1.17.0