1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Some more ENC render style improvements

This commit is contained in:
Martin Tůma 2022-11-25 23:20:35 +01:00
parent 04f45013eb
commit 4cfb967e39
8 changed files with 29 additions and 10 deletions

View File

@ -176,6 +176,9 @@
<file alias="fence-line.png">icons/map/marine/fence-line.png</file> <file alias="fence-line.png">icons/map/marine/fence-line.png</file>
<file alias="crane.png">icons/map/marine/crane.png</file> <file alias="crane.png">icons/map/marine/crane.png</file>
<file alias="distance-mark.png">icons/map/marine/distance-mark.png</file> <file alias="distance-mark.png">icons/map/marine/distance-mark.png</file>
<file alias="conveyor-line.png">icons/map/marine/conveyor-line.png</file>
<file alias="pipeline-overhead.png">icons/map/marine/pipeline-overhead.png</file>
<file alias="coast-guard.png">icons/map/marine/coast-guard.png</file>
</qresource> </qresource>
<!-- Mapsforge rendertheme --> <!-- Mapsforge rendertheme -->

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 B

View File

@ -194,7 +194,7 @@ bool ISO8211::readDDR(QFile &file)
int len = readDR(file, fields); int len = readDR(file, fields);
if (len < 0) { if (len < 0) {
_errorString = "Not a ENC file"; _errorString = "Not a ISO8211 file";
return false; return false;
} }

View File

@ -717,8 +717,10 @@ MapData::MapData(const QString &path): _fileName(path)
_errorString = ddf.errorString(); _errorString = ddf.errorString();
return; return;
} }
if (!processRecord(record, gv, COMF, _name)) if (!processRecord(record, gv, COMF, _name)) {
_errorString = "Invalid S-57 record";
return; return;
}
} }
Rect b; Rect b;

View File

@ -22,7 +22,9 @@
#define CBLOHD 21 #define CBLOHD 21
#define CBLSUB 22 #define CBLSUB 22
#define CANALS 23 #define CANALS 23
#define CGUSTA 29
#define COALNE 30 #define COALNE 30
#define CONVYR 34
#define CRANES 35 #define CRANES 35
#define DAMCON 38 #define DAMCON 38
#define DWRTPT 41 #define DWRTPT 41
@ -49,6 +51,7 @@
#define OBSTRN 86 #define OBSTRN 86
#define OFSPLF 87 #define OFSPLF 87
#define PILPNT 90 #define PILPNT 90
#define PIPOHD 93
#define PIPSOL 94 #define PIPSOL 94
#define PONTON 95 #define PONTON 95
#define PRCARE 96 #define PRCARE 96
@ -60,6 +63,7 @@
#define RIVERS 114 #define RIVERS 114
#define ROADWY 116 #define ROADWY 116
#define SLCONS 122 #define SLCONS 122
#define SILTNK 125
#define SLOTOP 126 #define SLOTOP 126
#define SOUNDG 129 #define SOUNDG 129
#define TSELNE 145 #define TSELNE 145
@ -81,6 +85,7 @@
#define I_FERYRT 17013 #define I_FERYRT 17013
#define I_HULKES 17020 #define I_HULKES 17020
#define I_PONTON 17021 #define I_PONTON 17021
#define I_PIPOHD 17024
#define I_FLODOC 17025 #define I_FLODOC 17025
#define I_BCNLAT 17028 #define I_BCNLAT 17028
#define I_BOYLAT 17029 #define I_BOYLAT 17029

View File

@ -36,6 +36,8 @@ void Style::defaultPolygonStyle()
Qt::DashDotDotLine)); Qt::DashDotDotLine));
_polygons[TYPE(OBSTRN)] = Polygon(Qt::NoBrush, QPen(QColor("#000000"), 1.5, _polygons[TYPE(OBSTRN)] = Polygon(Qt::NoBrush, QPen(QColor("#000000"), 1.5,
Qt::DotLine)); Qt::DotLine));
_polygons[TYPE(UWTROC)] = Polygon(Qt::NoBrush, QPen(QColor("#000000"), 1.5,
Qt::DotLine));
_polygons[TYPE(PONTON)] = Polygon(QBrush("#333333")); _polygons[TYPE(PONTON)] = Polygon(QBrush("#333333"));
_polygons[TYPE(I_PONTON)] = Polygon(QBrush("#333333")); _polygons[TYPE(I_PONTON)] = Polygon(QBrush("#333333"));
_polygons[TYPE(HULKES)] = Polygon(QBrush("#333333")); _polygons[TYPE(HULKES)] = Polygon(QBrush("#333333"));
@ -82,6 +84,8 @@ void Style::defaultPolygonStyle()
_polygons[TYPE(I_GATCON)] = Polygon(QBrush("#000000")); _polygons[TYPE(I_GATCON)] = Polygon(QBrush("#000000"));
_polygons[TYPE(I_TERMNL)] = Polygon(QBrush(QColor("#b8b04b")), _polygons[TYPE(I_TERMNL)] = Polygon(QBrush(QColor("#b8b04b")),
QPen(QColor("#966118"))); QPen(QColor("#966118")));
_polygons[TYPE(SILTNK)] = Polygon(QBrush("#d98b21"), QPen(QColor("#966118"),
2));
_drawOrder _drawOrder
<< TYPE(M_COVR) << TYPE(LNDARE) << SUBTYPE(DEPARE, 0) << TYPE(M_COVR) << TYPE(LNDARE) << SUBTYPE(DEPARE, 0)
@ -89,14 +93,15 @@ void Style::defaultPolygonStyle()
<< TYPE(UNSARE) << SUBTYPE(DEPARE, 4) << SUBTYPE(DEPARE, 5) << TYPE(UNSARE) << SUBTYPE(DEPARE, 4) << SUBTYPE(DEPARE, 5)
<< SUBTYPE(DEPARE, 6) << TYPE(LAKARE) << TYPE(CANALS) << TYPE(DYKCON) << SUBTYPE(DEPARE, 6) << TYPE(LAKARE) << TYPE(CANALS) << TYPE(DYKCON)
<< TYPE(RIVERS) << TYPE(DRGARE) << TYPE(FAIRWY) << TYPE(BUAARE) << TYPE(RIVERS) << TYPE(DRGARE) << TYPE(FAIRWY) << TYPE(BUAARE)
<< TYPE(BUISGL) << TYPE(AIRARE) << TYPE(BRIDGE) << TYPE(I_BRIDGE) << TYPE(BUISGL) << TYPE(SILTNK) << TYPE(AIRARE) << TYPE(BRIDGE)
<< TYPE(I_TERMNL) << TYPE(SLCONS) << TYPE(I_SLCONS) << TYPE(PONTON) << TYPE(I_BRIDGE) << TYPE(I_TERMNL) << TYPE(SLCONS) << TYPE(I_SLCONS)
<< TYPE(I_PONTON) << TYPE(HULKES) << TYPE(I_HULKES) << TYPE(FLODOC) << TYPE(PONTON) << TYPE(I_PONTON) << TYPE(HULKES) << TYPE(I_HULKES)
<< TYPE(I_FLODOC) << TYPE(DRYDOC) << TYPE(DAMCON) << TYPE(PYLONS) << TYPE(FLODOC) << TYPE(I_FLODOC) << TYPE(DRYDOC) << TYPE(DAMCON)
<< TYPE(MORFAC) << TYPE(GATCON) << TYPE(I_GATCON) << TYPE(DMPGRD) << TYPE(PYLONS) << TYPE(MORFAC) << TYPE(GATCON) << TYPE(I_GATCON)
<< TYPE(TSEZNE) << TYPE(OBSTRN) << TYPE(DWRTPT) << SUBTYPE(ACHARE, 1) << TYPE(DMPGRD) << TYPE(TSEZNE) << TYPE(OBSTRN) << TYPE(UWTROC)
<< SUBTYPE(I_ACHARE, 1) << SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2) << TYPE(DWRTPT) << SUBTYPE(ACHARE, 1) << SUBTYPE(I_ACHARE, 1)
<< SUBTYPE(I_RESARE, 2) << TYPE(PRCARE); << SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2)
<< TYPE(PRCARE);
} }
void Style::defaultLineStyle() void Style::defaultLineStyle()
@ -141,6 +146,9 @@ void Style::defaultLineStyle()
_lines[TYPE(BERTHS)] = Line(QPen(QColor("#333333"), 2)); _lines[TYPE(BERTHS)] = Line(QPen(QColor("#333333"), 2));
_lines[TYPE(I_BERTHS)] = Line(QPen(QColor("#333333"), 2)); _lines[TYPE(I_BERTHS)] = Line(QPen(QColor("#333333"), 2));
_lines[TYPE(FNCLNE)] = Line(QImage(":/marine/fence-line.png")); _lines[TYPE(FNCLNE)] = Line(QImage(":/marine/fence-line.png"));
_lines[TYPE(CONVYR)] = Line(QImage(":/marine/conveyor-line.png"));
_lines[TYPE(PIPOHD)] = Line(QImage(":/marine/pipeline-overhead.png"));
_lines[TYPE(I_PIPOHD)] = Line(QImage(":/marine/pipeline-overhead.png"));
} }
void Style::defaultPointStyle() void Style::defaultPointStyle()
@ -200,6 +208,7 @@ void Style::defaultPointStyle()
_points[SUBTYPE(I_DISMAR, 1)] = Point(QImage(":/marine/distance-mark.png")); _points[SUBTYPE(I_DISMAR, 1)] = Point(QImage(":/marine/distance-mark.png"));
_points[SUBTYPE(I_DISMAR, 1)].setTextColor(QColor("#ffffff")); _points[SUBTYPE(I_DISMAR, 1)].setTextColor(QColor("#ffffff"));
_points[SUBTYPE(I_DISMAR, 1)].setTextFontSize(Small); _points[SUBTYPE(I_DISMAR, 1)].setTextFontSize(Small);
_points[TYPE(CGUSTA)] = Point(QImage(":/marine/coast-guard.png"));
} }
Style::Style() Style::Style()