1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-05-04 02:17:45 +02:00

Degaussing ranges and pilot boarding areas

This commit is contained in:
Martin Tůma 2025-05-02 19:08:16 +02:00
parent 31a3463c9b
commit 0d65affd4b
4 changed files with 24 additions and 8 deletions

View File

@ -219,6 +219,7 @@
<file alias="sanctuary-line.png">icons/map/marine/sanctuary-line.png</file>
<file alias="fishing-farm.png">icons/map/marine/fishing-farm.png</file>
<file alias="shellfish-farm-line.png">icons/map/marine/shellfish-farm-line.png</file>
<file alias="degaussing-line.png">icons/map/marine/degaussing-line.png</file>
</qresource>
<!-- Patterns (Mapsforge) -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

View File

@ -191,6 +191,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context)
if (baseType == TSSLPT || baseType == RCTLPT || baseType == I_TRNBSN
|| baseType == BRIDGE || baseType == I_BRIDGE || baseType == BUAARE
|| baseType == LNDARE || baseType == LNDRGN || baseType == I_BUNSTA
|| baseType == PILBOP
|| type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(I_ACHARE, 2)
|| type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(I_ACHARE, 3)
|| type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 9)
@ -202,6 +203,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context)
|| type == SUBTYPE(RESARE, 5) || type == SUBTYPE(I_RESARE, 5)
|| type == SUBTYPE(RESARE, 6) || type == SUBTYPE(I_RESARE, 6)
|| type == SUBTYPE(RESARE, 7) || type == SUBTYPE(I_RESARE, 7)
|| type == SUBTYPE(RESARE, 8) || type == SUBTYPE(I_RESARE, 8)
|| type == SUBTYPE(RESARE, 9) || type == SUBTYPE(I_RESARE, 9)
|| type == SUBTYPE(RESARE, 12) || type == SUBTYPE(I_RESARE, 12)
|| type == SUBTYPE(RESARE, 14) || type == SUBTYPE(I_RESARE, 14)
@ -425,6 +427,9 @@ MapData::Point::Point(uint type, const Coordinates &c, const Attributes &attr,
_label = QString::fromUtf8("\xE2\x86\x95") + UNIT_SPACE
+ QString::number(clr) + UNIT_SPACE + hUnits(HUNI);
}
} else if (_type == SUBTYPE(RESARE, 8)) {
if (_label.isEmpty())
_label = "Degaussing Range";
}
}
@ -836,7 +841,7 @@ MapData::MapData(const QString &path)
if (!ddf.readRecord(record)) {
qWarning("%s: %s", qUtf8Printable(path),
qUtf8Printable(ddf.errorString()));
break;
return;
}
if (!processRecord(record, fe, vi, vc, ve, comf, somf, huni))
qWarning("%s: Invalid S-57 record", qUtf8Printable(path));

View File

@ -75,6 +75,7 @@ void Style::polygonStyle()
_polygons[SUBTYPE(RESARE, 5)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 6)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 7)] = Polygon(QImage(":/marine/sanctuary-line.png"));
_polygons[SUBTYPE(RESARE, 8)] = Polygon(QImage(":/marine/degaussing-line.png"));
_polygons[SUBTYPE(RESARE, 9)] = Polygon(QBrush(QColor(0xff, 0x00, 0x00),
Qt::BDiagPattern));
_polygons[SUBTYPE(RESARE, 12)] = Polygon(QImage(":/marine/safety-zone-line.png"));
@ -88,6 +89,10 @@ void Style::polygonStyle()
_polygons[SUBTYPE(I_RESARE, 1)] = _polygons[SUBTYPE(RESARE, 1)];
_polygons[SUBTYPE(I_RESARE, 2)] = _polygons[SUBTYPE(RESARE, 2)];
_polygons[SUBTYPE(I_RESARE, 4)] = _polygons[SUBTYPE(RESARE, 4)];
_polygons[SUBTYPE(I_RESARE, 5)] = _polygons[SUBTYPE(RESARE, 5)];
_polygons[SUBTYPE(I_RESARE, 6)] = _polygons[SUBTYPE(RESARE, 6)];
_polygons[SUBTYPE(I_RESARE, 7)] = _polygons[SUBTYPE(RESARE, 7)];
_polygons[SUBTYPE(I_RESARE, 8)] = _polygons[SUBTYPE(RESARE, 8)];
_polygons[SUBTYPE(I_RESARE, 9)] = _polygons[SUBTYPE(RESARE, 9)];
_polygons[SUBTYPE(I_RESARE, 12)] = _polygons[SUBTYPE(RESARE, 12)];
_polygons[SUBTYPE(I_RESARE, 14)] = _polygons[SUBTYPE(RESARE, 14)];
@ -159,6 +164,8 @@ void Style::polygonStyle()
1, Qt::DashLine));
_polygons[TYPE(CONZNE)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb),
1, Qt::DashDotLine));
_polygons[TYPE(PILBOP)] = Polygon(Qt::NoBrush, QPen(QColor(0xeb, 0x49, 0xeb),
1, Qt::DashLine));
_drawOrder
<< TYPE(LNDARE) << SUBTYPE(DEPARE, 0) << SUBTYPE(DEPARE, 1)
@ -184,13 +191,14 @@ void Style::polygonStyle()
<< SUBTYPE(I_RESARE, 1) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2)
<< SUBTYPE(RESARE, 4) << SUBTYPE(I_RESARE, 4) << SUBTYPE(RESARE, 5)
<< SUBTYPE(I_RESARE, 5) << SUBTYPE(RESARE, 6) << SUBTYPE(I_RESARE, 6)
<< SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 9)
<< SUBTYPE(I_RESARE, 9) << SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12)
<< SUBTYPE(RESARE, 14) << SUBTYPE(I_RESARE, 14) << SUBTYPE(RESARE, 17)
<< SUBTYPE(I_RESARE, 17) << SUBTYPE(RESARE, 22) << SUBTYPE(I_RESARE, 22)
<< SUBTYPE(RESARE, 23) << SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25)
<< SUBTYPE(I_RESARE, 25) << SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26)
<< TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN)
<< SUBTYPE(RESARE, 7) << SUBTYPE(I_RESARE, 7) << SUBTYPE(RESARE, 8)
<< SUBTYPE(I_RESARE, 8) << SUBTYPE(RESARE, 9) << SUBTYPE(I_RESARE, 9)
<< SUBTYPE(RESARE, 12) << SUBTYPE(I_RESARE, 12) << SUBTYPE(RESARE, 14)
<< SUBTYPE(I_RESARE, 14) << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17)
<< SUBTYPE(RESARE, 22) << SUBTYPE(I_RESARE, 22) << SUBTYPE(RESARE, 23)
<< SUBTYPE(I_RESARE, 23) << SUBTYPE(RESARE, 25) << SUBTYPE(I_RESARE, 25)
<< SUBTYPE(RESARE, 26) << SUBTYPE(I_RESARE, 26) << TYPE(CBLARE)
<< TYPE(PIPARE) << TYPE(PRCARE) << TYPE(I_TRNBSN) << TYPE(PILBOP)
<< SUBTYPE(MARCUL, 0) << SUBTYPE(MARCUL, 1) << SUBTYPE(MARCUL, 2)
<< SUBTYPE(MARCUL, 3) << TYPE(CONZNE);
}
@ -456,6 +464,7 @@ void Style::pointStyle(qreal ratio)
_points[SUBTYPE(RESARE, 5)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 6)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 7)] = _points[SUBTYPE(RESARE, 4)];
_points[SUBTYPE(RESARE, 8)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 9)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 12)] = _points[SUBTYPE(RESARE, 1)];
_points[SUBTYPE(RESARE, 14)] = _points[SUBTYPE(RESARE, 1)];
@ -470,6 +479,7 @@ void Style::pointStyle(qreal ratio)
_points[SUBTYPE(I_RESARE, 5)] = _points[SUBTYPE(RESARE, 5)];
_points[SUBTYPE(I_RESARE, 6)] = _points[SUBTYPE(RESARE, 6)];
_points[SUBTYPE(I_RESARE, 7)] = _points[SUBTYPE(RESARE, 7)];
_points[SUBTYPE(I_RESARE, 8)] = _points[SUBTYPE(RESARE, 8)];
_points[SUBTYPE(I_RESARE, 9)] = _points[SUBTYPE(RESARE, 9)];
_points[SUBTYPE(I_RESARE, 12)] = _points[SUBTYPE(RESARE, 12)];
_points[SUBTYPE(I_RESARE, 14)] = _points[SUBTYPE(RESARE, 14)];