mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-05-10 05:07:44 +02:00
Show obstruction/wreck depths
This commit is contained in:
parent
70acdd3d96
commit
ca3ea08b99
@ -33,6 +33,7 @@
|
|||||||
#define TRAFIC 172
|
#define TRAFIC 172
|
||||||
#define VALDCO 174
|
#define VALDCO 174
|
||||||
#define VALNMR 178
|
#define VALNMR 178
|
||||||
|
#define VALSOU 179
|
||||||
#define VERCLR 181
|
#define VERCLR 181
|
||||||
#define WATLEV 187
|
#define WATLEV 187
|
||||||
|
|
||||||
|
@ -351,6 +351,7 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
|
|||||||
uint HUNI, bool polygon) : _pos(c), _attr(attr), _polygon(polygon)
|
uint HUNI, bool polygon) : _pos(c), _attr(attr), _polygon(polygon)
|
||||||
{
|
{
|
||||||
uint subtype = 0;
|
uint subtype = 0;
|
||||||
|
bool ok;
|
||||||
|
|
||||||
if (type == HRBFAC)
|
if (type == HRBFAC)
|
||||||
subtype = CATHAF;
|
subtype = CATHAF;
|
||||||
@ -442,11 +443,14 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
|
|||||||
_label += "\n(" + QString::fromLatin1(_attr.value(ELEVAT))
|
_label += "\n(" + QString::fromLatin1(_attr.value(ELEVAT))
|
||||||
+ "\xE2\x80\x89m)";
|
+ "\xE2\x80\x89m)";
|
||||||
} else if (type == BRIDGE || type == I_BRIDGE) {
|
} else if (type == BRIDGE || type == I_BRIDGE) {
|
||||||
double clr = _attr.value(VERCLR).toDouble();
|
double clr = _attr.value(VERCLR).toDouble(&ok);
|
||||||
if (clr > 0) {
|
if (ok && clr > 0)
|
||||||
_label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE
|
_label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE
|
||||||
+ QString::number(clr) + UNIT_SPACE + hUnits(HUNI);
|
+ QString::number(clr) + UNIT_SPACE + hUnits(HUNI);
|
||||||
}
|
} else if (type == OBSTRN || type == WRECKS) {
|
||||||
|
double depth = _attr.value(VALSOU).toDouble(&ok);
|
||||||
|
if (ok && _label.isEmpty())
|
||||||
|
_label = QString::number(depth);
|
||||||
} else if (_type == SUBTYPE(RESARE, 8)) {
|
} else if (_type == SUBTYPE(RESARE, 8)) {
|
||||||
if (_label.isEmpty())
|
if (_label.isEmpty())
|
||||||
_label = "Degaussing Range";
|
_label = "Degaussing Range";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user