1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-17 12:24:24 +02:00

Some more ENC style improvements and fixes

This commit is contained in:
2022-12-04 12:39:47 +01:00
parent 07954b7d1a
commit b7ea02bc44
93 changed files with 263 additions and 207 deletions

View File

@ -9,9 +9,11 @@
#define CATMOR 40
#define CATTRK 54
#define CATREA 56
#define CATSCF 65
#define CATWRK 71
#define DRVAL1 87
#define ELEVAT 90
#define FUNCTN 94
#define OBJNAM 116
#define ORIENT 117
#define RESTRN 131

View File

@ -493,7 +493,9 @@ MapData::Attr MapData::pointAttr(const ISO8211::Record &r, uint OBJL)
|| (OBJL == WRECKS && key == CATWRK)
|| (OBJL == MORFAC && key == CATMOR)
|| (OBJL == UWTROC && key == WATLEV)
|| (OBJL == BUAARE && key == CATBUA))
|| (OBJL == BUAARE && key == CATBUA)
|| (OBJL == SMCFAC && key == CATSCF)
|| (OBJL == BUISGL && key == FUNCTN))
subtype = av.at(1).toByteArray().toUInt();
else if (OBJL == I_DISMAR && key == CATDIS)
subtype |= av.at(1).toByteArray().toUInt();
@ -552,7 +554,8 @@ MapData::Attr MapData::polyAttr(const ISO8211::Record &r, uint OBJL)
if ((OBJL == RESARE && key == CATREA)
|| (OBJL == I_RESARE && key == CATREA)
|| (OBJL == ACHARE && key == CATACH)
|| (OBJL == I_ACHARE && key == I_CATACH))
|| (OBJL == I_ACHARE && key == I_CATACH)
|| (OBJL == HRBFAC && key == CATHAF))
subtype = av.at(1).toByteArray().toUInt();
else if ((OBJL == RESARE && key == RESTRN)
|| (OBJL == I_RESARE && key == I_RESTRN)) {

View File

@ -19,6 +19,7 @@
#define BOYLAT 17
#define BOYSAW 18
#define BOYSPP 19
#define CBLARE 20
#define CBLOHD 21
#define CBLSUB 22
#define CANALS 23
@ -52,6 +53,7 @@
#define OBSTRN 86
#define OFSPLF 87
#define PILPNT 90
#define PIPARE 92
#define PIPOHD 93
#define PIPSOL 94
#define PONTON 95
@ -69,11 +71,13 @@
#define SLCONS 122
#define SILTNK 125
#define SLOTOP 126
#define SMCFAC 128
#define SOUNDG 129
#define TSELNE 145
#define TSSBND 146
#define TSSLPT 148
#define TSEZNE 150
#define TUNNEL 151
#define UWTROC 153
#define UNSARE 154
#define WRECKS 159

View File

@ -229,6 +229,25 @@ void RasterTile::processPoints(QList<TextItem*> &textItems)
else
delete item;
}
for (int i = 0; i < _polygons.size(); i++) {
const MapData::Poly *poly = _polygons.at(i);
if (poly->type()>>16 == HRBFAC) {
const Style::Point &style = s.point(poly->type());
const QImage *img = style.img().isNull() ? 0 : &style.img();
if (!img)
continue;
TextPointItem *item = new TextPointItem(
ll2xy(centroid(poly->path().first())).toPoint(), 0, 0,
&style.img(), 0, 0, 0, 0);
if (item->isValid() && !item->collides(textItems))
textItems.append(item);
else
delete item;
}
}
}
void RasterTile::processLines(QList<TextItem*> &textItems)

View File

@ -94,6 +94,10 @@ void Style::defaultPolygonStyle()
Qt::Dense7Pattern));
_polygons[TYPE(I_LOKBSN)] = Polygon(QBrush(QColor("#333333"),
Qt::Dense7Pattern));
_polygons[TYPE(TUNNEL)] = Polygon(Qt::NoBrush, QPen(QColor("#a3a3a3"), 1,
Qt::DashLine));
_polygons[TYPE(CBLARE)] = Polygon(QImage(":/marine/cable-area-line.png"));
_polygons[TYPE(PIPARE)] = Polygon(QImage(":/marine/pipeline-area-line.png"));
_drawOrder
<< TYPE(M_COVR) << TYPE(LNDARE) << SUBTYPE(DEPARE, 0)
@ -102,15 +106,15 @@ void Style::defaultPolygonStyle()
<< SUBTYPE(DEPARE, 6) << TYPE(LAKARE) << TYPE(CANALS) << TYPE(DYKCON)
<< TYPE(RIVERS) << TYPE(DRGARE) << TYPE(FAIRWY) << TYPE(LOKBSN)
<< TYPE(I_LOKBSN) << TYPE(BUAARE) << TYPE(BUISGL) << TYPE(SILTNK)
<< TYPE(AIRARE) << TYPE(BRIDGE) << TYPE(I_BRIDGE) << TYPE(I_TERMNL)
<< TYPE(SLCONS) << TYPE(I_SLCONS) << TYPE(PONTON) << TYPE(I_PONTON)
<< TYPE(HULKES) << TYPE(I_HULKES) << TYPE(FLODOC) << TYPE(I_FLODOC)
<< TYPE(DRYDOC) << TYPE(DAMCON) << TYPE(PYLONS) << TYPE(MORFAC)
<< TYPE(GATCON) << TYPE(I_GATCON) << TYPE(DMPGRD) << TYPE(TSEZNE)
<< TYPE(OBSTRN) << TYPE(UWTROC) << TYPE(DWRTPT) << SUBTYPE(ACHARE, 1)
<< SUBTYPE(I_ACHARE, 1) << SUBTYPE(RESARE, 9) << SUBTYPE(RESARE, 2)
<< SUBTYPE(I_RESARE, 2) << SUBTYPE(RESARE, 17) << SUBTYPE(I_RESARE, 17)
<< TYPE(PRCARE);
<< TYPE(AIRARE) << TYPE(BRIDGE) << TYPE(I_BRIDGE) << TYPE(TUNNEL)
<< TYPE(I_TERMNL) << TYPE(SLCONS) << TYPE(I_SLCONS) << TYPE(PONTON)
<< TYPE(I_PONTON) << TYPE(HULKES) << TYPE(I_HULKES) << TYPE(FLODOC)
<< TYPE(I_FLODOC) << TYPE(DRYDOC) << TYPE(DAMCON) << TYPE(PYLONS)
<< TYPE(MORFAC) << TYPE(GATCON) << TYPE(I_GATCON) << TYPE(DMPGRD)
<< TYPE(TSEZNE) << TYPE(OBSTRN) << TYPE(UWTROC) << TYPE(DWRTPT)
<< SUBTYPE(ACHARE, 1) << SUBTYPE(I_ACHARE, 1) << SUBTYPE(RESARE, 9)
<< SUBTYPE(RESARE, 2) << SUBTYPE(I_RESARE, 2) << SUBTYPE(RESARE, 17)
<< SUBTYPE(I_RESARE, 17) << TYPE(CBLARE) << TYPE(PIPARE) << TYPE(PRCARE);
}
void Style::defaultLineStyle()
@ -204,6 +208,7 @@ void Style::defaultPointStyle()
Small);
_points[SUBTYPE(UWTROC, 5)] = Point(QImage(":/marine/rock-dangerous.png"),
Small);
_points[SUBTYPE(HRBFAC, 4)] = Point(QImage(":/marine/fishing-harbor.png"));
_points[SUBTYPE(HRBFAC, 5)] = Point(QImage(":/marine/yacht-harbor.png"));
_points[TYPE(ACHBRT)] = Point(QImage(":/marine/anchorage.png"));
_points[TYPE(I_ACHBRT)] = Point(QImage(":/marine/anchorage.png"));
@ -225,6 +230,26 @@ void Style::defaultPointStyle()
_points[TYPE(RTPBCN)] = Point(QImage(":/marine/radar-transponder.png"));
_points[TYPE(SILTNK)] = Point(QImage(":/marine/silo.png"));
_points[TYPE(I_TRNBSN)] = Point(QImage(":/marine/turning-basin.png"));
_points[SUBTYPE(SMCFAC, 7)] = Point(QImage(":/POI/restaurant-11.png"));
_points[SUBTYPE(SMCFAC, 11)] = Point(QImage(":/POI/pharmacy-11.png"));
_points[SUBTYPE(SMCFAC, 12)] = Point(QImage(":/POI/drinking-water-11.png"));
_points[SUBTYPE(SMCFAC, 13)] = Point(QImage(":/POI/fuel-11.png"));
_points[SUBTYPE(SMCFAC, 18)] = Point(QImage(":/POI/toilet-11.png"));
_points[SUBTYPE(SMCFAC, 20)] = Point(QImage(":/POI/telephone-11.png"));
_points[SUBTYPE(SMCFAC, 22)] = Point(QImage(":/POI/parking-11.png"));
_points[SUBTYPE(SMCFAC, 25)] = Point(QImage(":/POI/campsite-11.png"));
_points[SUBTYPE(BUISGL, 2)] = Point(QImage(":/POI/harbor-11.png"));
_points[SUBTYPE(BUISGL, 5)] = Point(QImage(":/POI/hospital-11.png"));
_points[SUBTYPE(BUISGL, 6)] = Point(QImage(":/POI/post-11.png"));
_points[SUBTYPE(BUISGL, 7)] = Point(QImage(":/POI/lodging-11.png"));
_points[SUBTYPE(BUISGL, 9)] = Point(QImage(":/POI/police-11.png"));
_points[SUBTYPE(BUISGL, 13)] = Point(QImage(":/POI/bank-11.png"));
_points[SUBTYPE(BUISGL, 19)] = Point(QImage(":/POI/school-11.png"));
_points[SUBTYPE(BUISGL, 20)] = Point(QImage(":/POI/religious-christian-11.png"));
_points[SUBTYPE(BUISGL, 22)] = Point(QImage(":/POI/religious-jewish-11.png"));
_points[SUBTYPE(BUISGL, 26)] = Point(QImage(":/POI/religious-muslim-11.png"));
_points[SUBTYPE(BUISGL, 42)] = Point(QImage(":/POI/bus-11.png"));
}
Style::Style()