mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Compare commits
No commits in common. "76b6daa02ebf65498018c36c95146d0e27d7ff71" and "14aef3556c89273574cceb4ab844288245e20186" have entirely different histories.
76b6daa02e
...
14aef3556c
@ -25,7 +25,7 @@
|
||||
<location filename="../src/GUI/cadencegraph.cpp" line="12"/>
|
||||
<location filename="../src/GUI/cadencegraph.h" line="16"/>
|
||||
<source>Cadence</source>
|
||||
<translation>Kadens</translation>
|
||||
<translation>Stegfrekvens</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/cadencegraph.cpp" line="27"/>
|
||||
@ -157,7 +157,7 @@
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="167"/>
|
||||
<source>TwoNav files</source>
|
||||
<translation>TwoNav-filer</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/data/data.cpp" line="168"/>
|
||||
@ -175,7 +175,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/dirselectwidget.cpp" line="38"/>
|
||||
<source>Select directory</source>
|
||||
<translation>Velg mappe</translation>
|
||||
<translation type="unfinished">Velg mappe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -369,7 +369,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="253"/>
|
||||
<source>Load POI file...</source>
|
||||
<translation>Last inn interessepunkt-fil…</translation>
|
||||
<translation>Last inn POI-fil…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="258"/>
|
||||
@ -384,22 +384,22 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="268"/>
|
||||
<source>Overlap POIs</source>
|
||||
<translation>Overlapp interessepunkter</translation>
|
||||
<translation>Overlapp POI-er</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="273"/>
|
||||
<source>Show POI icons</source>
|
||||
<translation>Vis interessepunktikoner</translation>
|
||||
<translation>Vis POI-ikoner</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="278"/>
|
||||
<source>Show POI labels</source>
|
||||
<translation>Vis interessepunktetiketter</translation>
|
||||
<translation>Vis POI-etiketter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="283"/>
|
||||
<source>Show POIs</source>
|
||||
<translation>Vis interessepunkter</translation>
|
||||
<translation>Vis POI-er</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="294"/>
|
||||
@ -414,7 +414,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="309"/>
|
||||
<source>Load map directory...</source>
|
||||
<translation>Last inn kartmappe…</translation>
|
||||
<translation type="unfinished">Last inn kartmappe …</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="312"/>
|
||||
@ -436,22 +436,22 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="335"/>
|
||||
<source>Show position</source>
|
||||
<translation>Vis posisjon</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="341"/>
|
||||
<source>Follow position</source>
|
||||
<translation>Følg posisjon</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="346"/>
|
||||
<source>Show coordinates</source>
|
||||
<translation>Vis koordinater</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="352"/>
|
||||
<source>Show motion info</source>
|
||||
<translation>Vis bevegelsesinfo</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="359"/>
|
||||
@ -521,7 +521,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="423"/>
|
||||
<source>Show local DEM tiles</source>
|
||||
<translation>Vis lokale DEM-fliser</translation>
|
||||
<translation>Vis lokale DEM-flis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="428"/>
|
||||
@ -533,7 +533,7 @@
|
||||
<location filename="../src/GUI/gui.cpp" line="1252"/>
|
||||
<location filename="../src/GUI/gui.cpp" line="1320"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distanse</translation>
|
||||
<translation>Avstand</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="444"/>
|
||||
@ -551,7 +551,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="455"/>
|
||||
<source>Show slider info</source>
|
||||
<translation>Vis skyverinfo</translation>
|
||||
<translation>Vis linjalinfo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="462"/>
|
||||
@ -578,7 +578,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="485"/>
|
||||
<source>Imperial</source>
|
||||
<translation>Britisk</translation>
|
||||
<translation>Imperial</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="491"/>
|
||||
@ -593,7 +593,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="505"/>
|
||||
<source>Degrees and decimal minutes (DMM)</source>
|
||||
<translation>Grader og desimalminutter (DMM)</translation>
|
||||
<translation>Desimalgrader og desimalminutter (DMM)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="512"/>
|
||||
@ -608,7 +608,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="524"/>
|
||||
<source>Options...</source>
|
||||
<translation>Alternativer…</translation>
|
||||
<translation>Valg…</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="529"/>
|
||||
@ -648,17 +648,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="626"/>
|
||||
<source>&POI</source>
|
||||
<translation>I&nteressepunkt</translation>
|
||||
<translation>&POI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="642"/>
|
||||
<source>Position</source>
|
||||
<translation>Posisjon</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="842"/>
|
||||
<source>Symbols directory:</source>
|
||||
<translation>Symbolmappe:</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="1777"/>
|
||||
@ -833,7 +833,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="834"/>
|
||||
<source>POI directory:</source>
|
||||
<translation>Interessepunktmappe:</translation>
|
||||
<translation>POI-mappe:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="836"/>
|
||||
@ -859,12 +859,12 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="970"/>
|
||||
<source>Open POI file</source>
|
||||
<translation>Åpne interessepunktfil</translation>
|
||||
<translation>Åpne POI-fil</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="996"/>
|
||||
<source>Error loading POI file:</source>
|
||||
<translation>Kunne ikke laste inn interessepunktfil:</translation>
|
||||
<translation>Kunne ikke laste inn POI-fil:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="1226"/>
|
||||
@ -930,7 +930,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="1810"/>
|
||||
<source>No local DEM tiles found.</source>
|
||||
<translation>Fant ingen lokale DEM-fliser.</translation>
|
||||
<translation>Fant ingen lokale DEM-flis.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/gui.cpp" line="1824"/>
|
||||
@ -999,7 +999,7 @@
|
||||
<location filename="../src/GUI/graphview.cpp" line="75"/>
|
||||
<location filename="../src/GUI/graphview.cpp" line="177"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distanse</translation>
|
||||
<translation>Avsntand</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/graphview.cpp" line="109"/>
|
||||
@ -1053,7 +1053,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/heartrategraph.cpp" line="11"/>
|
||||
<source>bpm</source>
|
||||
<translation>slag/min</translation>
|
||||
<translation>bpm</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/heartrategraph.cpp" line="12"/>
|
||||
@ -1083,7 +1083,7 @@
|
||||
<location filename="../src/GUI/heartrategraphitem.cpp" line="18"/>
|
||||
<location filename="../src/GUI/heartrategraphitem.cpp" line="20"/>
|
||||
<source>bpm</source>
|
||||
<translation>slag/min</translation>
|
||||
<translation>s/m</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/heartrategraphitem.cpp" line="19"/>
|
||||
@ -1154,7 +1154,7 @@
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="135"/>
|
||||
<source>QuickChart maps</source>
|
||||
<translation>QuickChart-kart</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="137"/>
|
||||
@ -1179,7 +1179,7 @@
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="141"/>
|
||||
<source>World-file georeferenced images</source>
|
||||
<translation>World-file georefererte bilder</translation>
|
||||
<translation type="unfinished">Verdensfil for georefererte bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/map/maplist.cpp" line="143"/>
|
||||
@ -1212,7 +1212,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/motioninfoitem.cpp" line="103"/>
|
||||
<source>m/min</source>
|
||||
<translation>m/min</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1379,17 +1379,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="221"/>
|
||||
<source>POI color:</source>
|
||||
<translation>Interessepunktfarge:</translation>
|
||||
<translation>POI-farge:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="222"/>
|
||||
<source>POI size:</source>
|
||||
<translation>Interessepunktstørrelse:</translation>
|
||||
<translation>POI-størrelse:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="233"/>
|
||||
<source>POIs</source>
|
||||
<translation>Interessepunkter</translation>
|
||||
<translation>POI-er</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="255"/>
|
||||
@ -1521,7 +1521,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="393"/>
|
||||
<source>Computed from distance/time</source>
|
||||
<translation>Beregnet fra distanse/tid</translation>
|
||||
<translation>Utregnet fra avstand/tid</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="394"/>
|
||||
@ -1616,17 +1616,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="283"/>
|
||||
<source>Info background</source>
|
||||
<translation>Info-bakgrunn</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="289"/>
|
||||
<source>Crosshair color:</source>
|
||||
<translation>Trådkorsfarge:</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="290"/>
|
||||
<source>Info color:</source>
|
||||
<translation>Info-farge:</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="363"/>
|
||||
@ -1653,7 +1653,7 @@
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="551"/>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="798"/>
|
||||
<source>POI</source>
|
||||
<translation>Interessepunkt</translation>
|
||||
<translation>POI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="566"/>
|
||||
@ -1680,7 +1680,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="622"/>
|
||||
<source>Plugin:</source>
|
||||
<translation>Programtillegg:</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="642"/>
|
||||
@ -1715,7 +1715,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="670"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distanse</translation>
|
||||
<translation>Avstand</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="672"/>
|
||||
@ -1799,7 +1799,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="763"/>
|
||||
<source>POI:</source>
|
||||
<translation>Interessepunkt:</translation>
|
||||
<translation type="unfinished">POI:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="774"/>
|
||||
@ -1829,17 +1829,17 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="800"/>
|
||||
<source>Position</source>
|
||||
<translation>Posisjon</translation>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="801"/>
|
||||
<source>Print & Export</source>
|
||||
<translation>Utskrift og eksport</translation>
|
||||
<translation>Utskrift og ekport</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/optionsdialog.cpp" line="835"/>
|
||||
<source>Options</source>
|
||||
<translation>Alternativer</translation>
|
||||
<translation>Valg</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@ -1947,7 +1947,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/pngexportdialog.cpp" line="38"/>
|
||||
<source>Use anti-aliasing</source>
|
||||
<translation>Bruk kantutjevning</translation>
|
||||
<translation type="unfinished">Bruk kanutjevning</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/pngexportdialog.cpp" line="42"/>
|
||||
@ -2071,7 +2071,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/routeitem.cpp" line="21"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distanse</translation>
|
||||
<translation>Avstand</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/routeitem.cpp" line="32"/>
|
||||
@ -2154,7 +2154,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/speedgraph.cpp" line="130"/>
|
||||
<source>mi/h</source>
|
||||
<translation>mi/h</translation>
|
||||
<translation>mi/t</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/speedgraph.cpp" line="133"/>
|
||||
@ -2167,7 +2167,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/speedgraphitem.cpp" line="23"/>
|
||||
<source>mi/h</source>
|
||||
<translation>mi/h</translation>
|
||||
<translation>mi/t</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/speedgraphitem.cpp" line="24"/>
|
||||
@ -2292,7 +2292,7 @@
|
||||
<message>
|
||||
<location filename="../src/GUI/trackitem.cpp" line="20"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distanse</translation>
|
||||
<translation>Avstand</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/GUI/trackitem.cpp" line="23"/>
|
||||
|
@ -439,31 +439,27 @@ SectionEnd
|
||||
|
||||
;-------------------------------
|
||||
|
||||
; Descriptions
|
||||
;Descriptions
|
||||
|
||||
; Language strings
|
||||
;Language strings
|
||||
LangString DESC_QT ${LANG_ENGLISH} \
|
||||
"QT cross-platform application framework."
|
||||
LangString DESC_MSVC ${LANG_ENGLISH} \
|
||||
"Microsoft Visual C++ 2017 runtime. If already installed, will be skipped."
|
||||
LangString DESC_OPENSSL ${LANG_ENGLISH} \
|
||||
"OpenSSL library. Required for HTTPS to work."
|
||||
!ifndef QT6
|
||||
LangString DESC_ANGLE ${LANG_ENGLISH} \
|
||||
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
|
||||
!endif
|
||||
LangString DESC_APP ${LANG_ENGLISH} \
|
||||
"GPXSee application"
|
||||
LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
|
||||
"Localization"
|
||||
|
||||
; Assign language strings to sections
|
||||
;Assign language strings to sections
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QT} $(DESC_QT)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_OPENSSL} $(DESC_OPENSSL)
|
||||
!ifndef QT6
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
|
||||
!endif
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
||||
|
@ -95,8 +95,48 @@ static bool seekToLine(BitStream4R &bs, quint8 line)
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool readLine(BitStream4R &bs, const SubDiv *subdiv,
|
||||
const HuffmanTable *table, MapData::Poly &poly)
|
||||
{
|
||||
quint32 v1, v2, v2b;
|
||||
if (!bs.readVUint32SM(v1, v2, v2b))
|
||||
return false;
|
||||
bs.resize(v1);
|
||||
|
||||
quint32 lon, lat;
|
||||
if (!(bs.read(0x12 - v2b, lon) && bs.read(16, lat)))
|
||||
return false;
|
||||
if (2 < v2b)
|
||||
lon |= (v2 >> 2) << (0x12U - v2b);
|
||||
|
||||
QPoint pos = QPoint(LS(subdiv->lon(), 8) + LS((qint16)lon, 32-subdiv->bits()),
|
||||
LS(subdiv->lat(), 8) + LS((qint16)lat, 32-subdiv->bits()));
|
||||
Coordinates c(toWGS32(pos.x()), toWGS32(pos.y()));
|
||||
|
||||
poly.boundingRect = RectC(c, c);
|
||||
poly.points.append(QPointF(c.lon(), c.lat()));
|
||||
|
||||
HuffmanDeltaStreamR stream(bs, *table);
|
||||
if (!stream.init())
|
||||
return false;
|
||||
qint32 lonDelta, latDelta;
|
||||
|
||||
while (stream.readNext(lonDelta, latDelta)) {
|
||||
pos.rx() += LS(lonDelta, 32-subdiv->bits());
|
||||
if (pos.rx() < 0 && subdiv->lon() >= 0)
|
||||
pos.rx() = 0x7fffffff;
|
||||
pos.ry() += LS(latDelta, 32-subdiv->bits());
|
||||
|
||||
Coordinates c(toWGS32(pos.x()), toWGS32(pos.y()));
|
||||
poly.points.append(QPointF(c.lon(), c.lat()));
|
||||
poly.boundingRect = poly.boundingRect.united(c);
|
||||
}
|
||||
|
||||
return stream.atEnd();
|
||||
}
|
||||
|
||||
static bool readNodeGeometry(const NODFile *nod, SubFile::Handle &nodHdl,
|
||||
NODFile::AdjacencyInfo &adj, quint16 cnt, MapData::Poly &poly)
|
||||
NODFile::AdjacencyInfo &adj, MapData::Poly &poly, quint16 cnt = 0xFFFF)
|
||||
{
|
||||
for (int i = 0; i <= cnt; i++) {
|
||||
int ret = nod->nextNode(nodHdl, adj);
|
||||
@ -124,50 +164,10 @@ static bool skipNodes(const NODFile *nod, SubFile::Handle &nodHdl,
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool NETFile::readLine(BitStream4R &bs, const SubDiv *subdiv,
|
||||
MapData::Poly &poly) const
|
||||
{
|
||||
quint32 v1, v2, v2b;
|
||||
if (!bs.readVUint32SM(v1, v2, v2b))
|
||||
return false;
|
||||
bs.resize(v1);
|
||||
|
||||
quint32 lon, lat;
|
||||
if (!(bs.read(0x12 - v2b, lon) && bs.read(16, lat)))
|
||||
return false;
|
||||
if (2 < v2b)
|
||||
lon |= (v2 >> 2) << (0x12U - v2b);
|
||||
|
||||
QPoint pos = QPoint(LS(subdiv->lon(), 8) + LS((qint16)lon, 32-subdiv->bits()),
|
||||
LS(subdiv->lat(), 8) + LS((qint16)lat, 32-subdiv->bits()));
|
||||
Coordinates c(toWGS32(pos.x()), toWGS32(pos.y()));
|
||||
|
||||
poly.boundingRect = RectC(c, c);
|
||||
poly.points.append(QPointF(c.lon(), c.lat()));
|
||||
|
||||
HuffmanDeltaStreamR stream(bs, *_tp);
|
||||
if (!stream.init())
|
||||
return false;
|
||||
qint32 lonDelta, latDelta;
|
||||
|
||||
while (stream.readNext(lonDelta, latDelta)) {
|
||||
pos.rx() += LS(lonDelta, 32-subdiv->bits());
|
||||
if (pos.rx() < 0 && subdiv->lon() >= 0)
|
||||
pos.rx() = 0x7fffffff;
|
||||
pos.ry() += LS(latDelta, 32-subdiv->bits());
|
||||
|
||||
Coordinates c(toWGS32(pos.x()), toWGS32(pos.y()));
|
||||
poly.points.append(QPointF(c.lon(), c.lat()));
|
||||
poly.boundingRect = poly.boundingRect.united(c);
|
||||
}
|
||||
|
||||
return stream.atEnd();
|
||||
}
|
||||
|
||||
bool NETFile::readShape(const NODFile *nod, SubFile::Handle &nodHdl,
|
||||
NODFile::AdjacencyInfo &adj, BitStream4R &bs, const SubDiv *subdiv,
|
||||
quint32 shift, quint16 cnt, bool check, MapData::Poly &poly) const
|
||||
static bool readShape(const NODFile *nod, SubFile::Handle &nodHdl,
|
||||
NODFile::AdjacencyInfo &adj, BitStream4R &bs, const HuffmanTable *table,
|
||||
const SubDiv *subdiv, quint32 shift, MapData::Poly &poly,
|
||||
quint16 cnt = 0xFFFF, bool check = false)
|
||||
{
|
||||
quint32 v1, v2, v2b;
|
||||
if (!bs.readVUint32SM(v1, v2, v2b))
|
||||
@ -185,7 +185,7 @@ bool NETFile::readShape(const NODFile *nod, SubFile::Handle &nodHdl,
|
||||
bool startWithStream = flags & (1 << (v2b + 6));
|
||||
bool useEosBit = flags & (1 << (v2b + 5));
|
||||
|
||||
HuffmanDeltaStreamR stream(bs, *_tp);
|
||||
HuffmanDeltaStreamR stream(bs, *table);
|
||||
if (!stream.init(flags, v2b + 5))
|
||||
return false;
|
||||
|
||||
@ -325,12 +325,18 @@ bool NETFile::readShape(const NODFile *nod, SubFile::Handle &nodHdl,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NETFile::linkLabel(Handle &hdl, quint32 offset,
|
||||
|
||||
NETFile::~NETFile()
|
||||
{
|
||||
delete _huffmanTable;
|
||||
}
|
||||
|
||||
bool NETFile::linkLabel(Handle &hdl, quint32 offset, quint32 size,
|
||||
const LBLFile *lbl, Handle &lblHdl, Label &label) const
|
||||
{
|
||||
if (!seek(hdl, offset))
|
||||
return false;
|
||||
BitStream1 bs(*this, hdl, _linksSize - (offset - _linksOffset));
|
||||
BitStream1 bs(*this, hdl, size);
|
||||
|
||||
quint32 flags, labelPtr;
|
||||
if (!bs.read(8, flags))
|
||||
@ -383,11 +389,6 @@ void NETFile::clear()
|
||||
_huffmanTable = 0;
|
||||
}
|
||||
|
||||
NETFile::~NETFile()
|
||||
{
|
||||
delete _huffmanTable;
|
||||
}
|
||||
|
||||
bool NETFile::link(const SubDiv *subdiv, quint32 shift, Handle &hdl,
|
||||
const NODFile *nod, Handle &nodHdl2, Handle &nodHdl, const LBLFile *lbl,
|
||||
Handle &lblHdl, const NODFile::BlockInfo &blockInfo, quint8 linkId,
|
||||
@ -429,11 +430,10 @@ bool NETFile::link(const SubDiv *subdiv, quint32 shift, Handle &hdl,
|
||||
|
||||
if (singleTopology) {
|
||||
if (firstIsShape) {
|
||||
if (!readShape(nod, nodHdl, adj, bs, subdiv, shift, 0xFFFF,
|
||||
false, poly))
|
||||
if (!readShape(nod, nodHdl, adj, bs, _tp, subdiv, shift, poly))
|
||||
return false;
|
||||
} else {
|
||||
if (!readNodeGeometry(nod, nodHdl, adj, 0xFFFF, poly))
|
||||
if (!readNodeGeometry(nod, nodHdl, adj, poly))
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@ -444,11 +444,11 @@ bool NETFile::link(const SubDiv *subdiv, quint32 shift, Handle &hdl,
|
||||
if (i == lineId) {
|
||||
if (shape) {
|
||||
bool check = (i < ca.size()) ? (ca.at(i) & mask) : false;
|
||||
if (!readShape(nod, nodHdl, adj, bs, subdiv, shift,
|
||||
step, check, poly))
|
||||
if (!readShape(nod, nodHdl, adj, bs, _tp, subdiv,
|
||||
shift, poly, step, check))
|
||||
return false;
|
||||
} else {
|
||||
if (!readNodeGeometry(nod, nodHdl, adj, step, poly))
|
||||
if (!readNodeGeometry(nod, nodHdl, adj, poly, step))
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -470,12 +470,13 @@ bool NETFile::link(const SubDiv *subdiv, quint32 shift, Handle &hdl,
|
||||
return false;
|
||||
if (!seekToLine(bs, lineId))
|
||||
return false;
|
||||
if (!readLine(bs, subdiv, poly))
|
||||
if (!readLine(bs, subdiv, _tp, poly))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (lbl)
|
||||
linkLabel(hdl, linkOffset, lbl, lblHdl, poly.label);
|
||||
linkLabel(hdl, linkOffset, _linksSize - (linkOffset - _linksOffset),
|
||||
lbl, lblHdl, poly.label);
|
||||
|
||||
lines->append(poly);
|
||||
|
||||
|
@ -10,7 +10,6 @@ class LBLFile;
|
||||
class RGNFile;
|
||||
class SubDiv;
|
||||
class HuffmanTable;
|
||||
class BitStream4R;
|
||||
|
||||
class NETFile : public SubFile
|
||||
{
|
||||
@ -37,13 +36,8 @@ public:
|
||||
bool hasLinks() const {return (_linksSize > 0);}
|
||||
|
||||
private:
|
||||
bool linkLabel(Handle &hdl, quint32 offset, const LBLFile *lbl,
|
||||
Handle &lblHdl, Label &label) const;
|
||||
bool readShape(const NODFile *nod, SubFile::Handle &nodHdl,
|
||||
NODFile::AdjacencyInfo &adj, BitStream4R &bs, const SubDiv *subdiv,
|
||||
quint32 shift, quint16 cnt, bool check, MapData::Poly &poly) const;
|
||||
bool readLine(BitStream4R &bs, const SubDiv *subdiv,
|
||||
MapData::Poly &poly) const;
|
||||
bool linkLabel(Handle &hdl, quint32 offset, quint32 size,
|
||||
const LBLFile *lbl, Handle &lblHdl, Label &label) const;
|
||||
|
||||
HuffmanTable *_huffmanTable;
|
||||
const HuffmanTable *_tp;
|
||||
|
Loading…
Reference in New Issue
Block a user