libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout
include
osmscout
GroundTile.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_GROUNDTILE_H
2
#define OSMSCOUT_GROUNDTILE_H
3
4
/*
5
This source is part of the libosmscout library
6
Copyright (C) 2010 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 <vector>
24
25
#include <
osmscout/OSMScoutTypes.h
>
26
27
#include <
osmscout/system/Compiler.h
>
28
29
namespace
osmscout
{
30
46
struct
OSMSCOUT_API
GroundTile
CLASS_FINAL
47
{
48
enum
Type
{
49
unknown
= 0,
50
land
= 1,
// left side of the coast
51
water
= 2,
// right side of the coast
52
coast
= 3
53
};
54
58
struct
OSMSCOUT_API
Coord
59
{
60
static
const
uint16_t
CELL_MAX
;
61
62
uint16_t
x
;
63
uint16_t
y
;
64
bool
coast
;
65
66
Coord
() =
default
;
67
68
Coord
(uint16_t
x
,
69
uint16_t
y
,
70
bool
coast
)
71
:
x
(
x
),
72
y
(
y
),
73
coast
(
coast
)
74
{
75
}
76
77
void
Set
(uint16_t
x
,
78
uint16_t
y
,
79
bool
coast
)
80
{
81
this->x=
x
;
82
this->y=
y
;
83
this->coast=
coast
;
84
}
85
86
bool
operator==
(
const
Coord
&
coord
)
const
87
{
88
return
x
==
coord
.x &&
y
==
coord
.y &&
coast
==
coord
.coast;
89
}
90
};
91
92
Type
type
;
93
size_t
xAbs
;
94
size_t
yAbs
;
95
size_t
xRel
;
96
size_t
yRel
;
97
double
cellWidth
;
98
double
cellHeight
;
99
std::vector<Coord>
coords
;
100
101
GroundTile
() =
default
;
102
103
explicit
GroundTile
(
Type
type
)
104
:
type
(
type
)
105
{
106
// no code
107
}
108
};
109
}
110
111
#endif
Compiler.h
OSMSCOUT_API
#define OSMSCOUT_API
Definition
CoreImportExport.h:45
OSMScoutTypes.h
osmscout::CLASS_FINAL
Definition
Area.h:88
osmscout::CLASS_FINAL::GroundTile
GroundTile()=default
osmscout::CLASS_FINAL::yRel
size_t yRel
Y coordinate of cell in relation to cell index of this level.
Definition
GroundTile.h:96
osmscout::CLASS_FINAL::coord
const GeoCoord coord
Definition
RouteStateAgent.h:49
osmscout::CLASS_FINAL::coast
@ coast
right side of the coast => a water tile
Definition
GroundTile.h:52
osmscout::CLASS_FINAL::water
@ water
left side of the coast => a land tile
Definition
GroundTile.h:51
osmscout::CLASS_FINAL::unknown
@ unknown
Definition
GroundTile.h:49
osmscout::CLASS_FINAL::land
@ land
We do not know yet.
Definition
GroundTile.h:50
osmscout::CLASS_FINAL::coords
std::vector< Coord > coords
Optional coordinates for coastline.
Definition
GroundTile.h:99
osmscout::CLASS_FINAL::Type
Type
Definition
GroundTile.h:48
osmscout::CLASS_FINAL::yAbs
size_t yAbs
Absolute y coordinate of the cell in relation to level and cell size.
Definition
GroundTile.h:94
osmscout::CLASS_FINAL::type
Type type
The type of the cell.
Definition
GroundTile.h:92
osmscout::CLASS_FINAL::xAbs
size_t xAbs
Absolute x coordinate of the cell in relation to level and cell size.
Definition
GroundTile.h:93
osmscout::CLASS_FINAL::cellWidth
double cellWidth
Width of cell.
Definition
GroundTile.h:97
osmscout::CLASS_FINAL::cellHeight
double cellHeight
Height of cell.
Definition
GroundTile.h:98
osmscout::CLASS_FINAL::xRel
size_t xRel
X coordinate of cell in relation to cell index of this level.
Definition
GroundTile.h:95
osmscout::CLASS_FINAL::GroundTile
GroundTile(Type type)
Definition
GroundTile.h:103
osmscout
Definition
Area.h:39
osmscout::CLASS_FINAL::Coord::y
uint16_t y
Definition
GroundTile.h:63
osmscout::CLASS_FINAL::Coord::Coord
Coord(uint16_t x, uint16_t y, bool coast)
Definition
GroundTile.h:68
osmscout::CLASS_FINAL::Coord::coast
bool coast
Definition
GroundTile.h:64
osmscout::CLASS_FINAL::Coord::x
uint16_t x
Definition
GroundTile.h:62
osmscout::CLASS_FINAL::Coord::Coord
Coord()=default
osmscout::CLASS_FINAL::Coord::CELL_MAX
static const uint16_t CELL_MAX
Definition
GroundTile.h:60
osmscout::CLASS_FINAL::Coord::operator==
bool operator==(const Coord &coord) const
Definition
GroundTile.h:86
osmscout::CLASS_FINAL::Coord::Set
void Set(uint16_t x, uint16_t y, bool coast)
Definition
GroundTile.h:77
Generated by
1.17.0