1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-03-16 19:47:45 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
e4c79d7275 Added missing dams and pylons rendering 2022-11-16 22:51:16 +01:00
a718f1e122 Properly handle non-ASCII characters
(Support for UCS-2 encoded files is still missing as there is no such sample
file available.)
2022-11-16 22:47:30 +01:00
3 changed files with 16 additions and 10 deletions

View File

@ -420,14 +420,14 @@ MapData::Attr MapData::pointAttr(const ISO8211::Record &r, uint OBJL)
uint key = av.at(0).toUInt();
if (key == OBJNAM)
label = av.at(1).toString();
label = QString::fromLatin1(av.at(1).toByteArray());
if ((OBJL == HRBFAC && key == CATHAF)
|| (OBJL == LNDMRK && key == CATLMK)
|| (OBJL == WRECKS && key == CATWRK)
|| (OBJL == MORFAC && key == CATMOR)
|| (OBJL == UWTROC && key == WATLEV)
|| (OBJL == BUAARE && key == CATBUA))
subtype = av.at(1).toString().toUInt();
subtype = av.at(1).toByteArray().toUInt();
}
return Attr(subtype, label);
@ -447,12 +447,12 @@ MapData::Attr MapData::lineAttr(const ISO8211::Record &r, uint OBJL)
uint key = av.at(0).toUInt();
if (key == OBJNAM)
label = av.at(1).toString();
label = QString::fromLatin1(av.at(1).toByteArray());
if ((OBJL == DEPCNT && key == VALDCO)
|| (OBJL == LNDELV && key == ELEVAT))
label = av.at(1).toString();
label = QString::fromLatin1(av.at(1).toByteArray());
if (OBJL == RECTRC && key == CATTRK)
subtype = av.at(1).toString().toUInt();
subtype = av.at(1).toByteArray().toUInt();
}
return Attr(subtype, label);
@ -472,15 +472,15 @@ MapData::Attr MapData::polyAttr(const ISO8211::Record &r, uint OBJL)
uint key = av.at(0).toUInt();
if (OBJL == DEPARE && key == DRVAL1)
subtype = depthLevel(av.at(1).toString());
subtype = depthLevel(av.at(1).toByteArray());
else if ((OBJL == RESARE && key == CATREA)
|| (OBJL == ACHARE && key == CATACH))
subtype = av.at(1).toString().toUInt();
subtype = av.at(1).toByteArray().toUInt();
else if (OBJL == RESARE && key == RESTRN) {
if (av.at(1).toString().toUInt() == 1)
if (av.at(1).toByteArray().toUInt() == 1)
subtype = 2;
} else if (OBJL == TSSLPT && key == ORIENT) {
double angle = av.at(1).toString().toDouble();
double angle = av.at(1).toByteArray().toDouble();
subtype = (uint)(angle * 10);
}
}

View File

@ -22,6 +22,7 @@
#define CBLSUB 22
#define CANALS 23
#define COALNE 30
#define DAMCON 38
#define DEPARE 42
#define DEPCNT 43
#define DRGARE 46
@ -44,6 +45,7 @@
#define PIPSOL 94
#define PONTON 95
#define PRCARE 96
#define PYLONS 98
#define RAILWY 106
#define RECTRC 109
#define RESARE 112

View File

@ -56,6 +56,10 @@ void Style::defaultPolygonStyle()
_polygons[SUBTYPE(ACHARE, 1)] = Polygon(QImage(":/marine/anchor-line.png"));
_polygons[TYPE(PRCARE)] = Polygon(QBrush(QColor("#eb49eb"),
Qt::BDiagPattern));
_polygons[TYPE(DAMCON)] = Polygon(QBrush("#d98b21"), QPen(QColor("#000000"),
1));
_polygons[TYPE(PYLONS)] = Polygon(QBrush("#a58140"), QPen(QColor("#000000"),
1));
_drawOrder
<< TYPE(M_COVR) << TYPE(LNDARE) << SUBTYPE(DEPARE, 0)
@ -66,7 +70,7 @@ void Style::defaultPolygonStyle()
<< TYPE(BUISGL) << TYPE(AIRARE) << TYPE(BRIDGE) << TYPE(SLCONS)
<< TYPE(PONTON) << TYPE(DMPGRD) << TYPE(TSEZNE) << TYPE(OBSTRN)
<< SUBTYPE(ACHARE, 1) << SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2)
<< TYPE(PRCARE);
<< TYPE(PRCARE) << TYPE(DAMCON) << TYPE(PYLONS);
}
void Style::defaultLineStyle()