Hello community, here is the log from the commit of package gpxsee for openSUSE:Factory checked in at 2020-10-28 11:26:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gpxsee (Old) and /work/SRC/openSUSE:Factory/.gpxsee.new.3463 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gpxsee" Wed Oct 28 11:26:15 2020 rev:60 rq:844516 version:7.35 Changes: -------- --- /work/SRC/openSUSE:Factory/gpxsee/gpxsee.changes 2020-10-10 00:29:27.597156244 +0200 +++ /work/SRC/openSUSE:Factory/.gpxsee.new.3463/gpxsee.changes 2020-10-28 11:26:25.798913407 +0100 @@ -1,0 +2,8 @@ +Tue Oct 27 21:32:16 CET 2020 - tu...@cbox.cz + +- Update to version 7.35 + * IMG format compatability, performance and layout improvements. + * Fixed CRS entries parsing (WMS, WMTS) + * Various minor bug fixes. + +------------------------------------------------------------------- Old: ---- GPXSee-7.34.tar.gz New: ---- GPXSee-7.35.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gpxsee.spec ++++++ --- /var/tmp/diff_new_pack.4IHZen/_old 2020-10-28 11:26:26.634914303 +0100 +++ /var/tmp/diff_new_pack.4IHZen/_new 2020-10-28 11:26:26.638914308 +0100 @@ -19,7 +19,7 @@ # See also http://en.opensuse.org/openSUSE:Specfile_guidelines Name: gpxsee -Version: 7.34 +Version: 7.35 Release: 1 Summary: GPS log file visualization and analysis tool License: GPL-3.0-only ++++++ GPXSee-7.34.tar.gz -> GPXSee-7.35.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/.appveyor.yml new/GPXSee-7.35/.appveyor.yml --- old/GPXSee-7.34/.appveyor.yml 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/.appveyor.yml 2020-10-27 20:52:29.000000000 +0100 @@ -1,4 +1,4 @@ -version: 7.34.{build} +version: 7.35.{build} configuration: - Release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/gpxsee.pro new/GPXSee-7.35/gpxsee.pro --- old/GPXSee-7.34/gpxsee.pro 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/gpxsee.pro 2020-10-27 20:52:29.000000000 +0100 @@ -3,7 +3,7 @@ } else { TARGET = GPXSee } -VERSION = 7.34 +VERSION = 7.35 QT += core \ gui \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/gpxsee.qrc new/GPXSee-7.35/gpxsee.qrc --- old/GPXSee-7.34/gpxsee.qrc 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/gpxsee.qrc 2020-10-27 20:52:29.000000000 +0100 @@ -67,10 +67,12 @@ <file alias="cinema-11.png">icons/POI/cinema-11.png</file> <file alias="clothing-store-11.png">icons/POI/clothing-store-11.png</file> <file alias="communications-tower-11.png">icons/POI/communications-tower-11.png</file> + <file alias="convenience-11.png">icons/POI/convenience-11.png</file> <file alias="dam-11.png">icons/POI/dam-11.png</file> <file alias="danger-11.png">icons/POI/danger-11.png</file> <file alias="drinking-water-11.png">icons/POI/drinking-water-11.png</file> <file alias="fast-food-11.png">icons/POI/fast-food-11.png</file> + <file alias="entrance-alt1-11.png">icons/POI/entrance-alt1-11.png</file> <file alias="fire-station-11.png">icons/POI/fire-station-11.png</file> <file alias="fitness-centre-11.png">icons/POI/fitness-centre-11.png</file> <file alias="fuel-11.png">icons/POI/fuel-11.png</file> @@ -97,7 +99,6 @@ <file alias="place-of-worship-11.png">icons/POI/place-of-worship-11.png</file> <file alias="police-11.png">icons/POI/police-11.png</file> <file alias="post-11.png">icons/POI/post-11.png</file> - <file alias="prison-11.png">icons/POI/prison-11.png</file> <file alias="religious-christian-11.png">icons/POI/religious-christian-11.png</file> <file alias="religious-jewish-11.png">icons/POI/religious-jewish-11.png</file> <file alias="religious-muslim-11.png">icons/POI/religious-muslim-11.png</file> Binary files old/GPXSee-7.34/icons/POI/convenience-11.png and new/GPXSee-7.35/icons/POI/convenience-11.png differ Binary files old/GPXSee-7.34/icons/POI/entrance-alt1-11.png and new/GPXSee-7.35/icons/POI/entrance-alt1-11.png differ Binary files old/GPXSee-7.34/icons/POI/prison-11.png and new/GPXSee-7.35/icons/POI/prison-11.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/lang/gpxsee_fi.ts new/GPXSee-7.35/lang/gpxsee_fi.ts --- old/GPXSee-7.34/lang/gpxsee_fi.ts 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/lang/gpxsee_fi.ts 2020-10-27 20:52:29.000000000 +0100 @@ -1529,7 +1529,7 @@ <message> <location filename="../src/GUI/pdfexportdialog.cpp" line="62"/> <source>cm</source> - <translation type="unfinished"></translation> + <translation>cm</translation> </message> <message> <location filename="../src/GUI/pdfexportdialog.cpp" line="68"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/lang/gpxsee_nb.ts new/GPXSee-7.35/lang/gpxsee_nb.ts --- old/GPXSee-7.34/lang/gpxsee_nb.ts 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/lang/gpxsee_nb.ts 2020-10-27 20:52:29.000000000 +0100 @@ -1529,7 +1529,7 @@ <message> <location filename="../src/GUI/pdfexportdialog.cpp" line="62"/> <source>cm</source> - <translation type="unfinished"></translation> + <translation>cm</translation> </message> <message> <location filename="../src/GUI/pdfexportdialog.cpp" line="68"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/lang/gpxsee_pt_BR.ts new/GPXSee-7.35/lang/gpxsee_pt_BR.ts --- old/GPXSee-7.34/lang/gpxsee_pt_BR.ts 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/lang/gpxsee_pt_BR.ts 2020-10-27 20:52:29.000000000 +0100 @@ -1313,7 +1313,7 @@ <message> <location filename="../src/GUI/optionsdialog.cpp" line="442"/> <source>Use segments</source> - <translation type="unfinished"></translation> + <translation>Usar segmentos</translation> </message> <message> <location filename="../src/GUI/optionsdialog.cpp" line="481"/> @@ -1529,7 +1529,7 @@ <message> <location filename="../src/GUI/pdfexportdialog.cpp" line="62"/> <source>cm</source> - <translation type="unfinished"></translation> + <translation>cm</translation> </message> <message> <location filename="../src/GUI/pdfexportdialog.cpp" line="68"/> @@ -1604,22 +1604,22 @@ <message> <location filename="../src/GUI/pngexportdialog.cpp" line="41"/> <source>Use anti-aliasing</source> - <translation type="unfinished">Usar anti-aliasing</translation> + <translation>Usar anti-aliasing</translation> </message> <message> <location filename="../src/GUI/pngexportdialog.cpp" line="45"/> <source>Image Setup</source> - <translation type="unfinished"></translation> + <translation>Configuração da Imagem</translation> </message> <message> <location filename="../src/GUI/pngexportdialog.cpp" line="48"/> <source>Image width:</source> - <translation type="unfinished"></translation> + <translation>Largura da imagem:</translation> </message> <message> <location filename="../src/GUI/pngexportdialog.cpp" line="49"/> <source>Image height:</source> - <translation type="unfinished"></translation> + <translation>Altura da imagem:</translation> </message> <message> <location filename="../src/GUI/pngexportdialog.cpp" line="50"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/lang/gpxsee_ru.ts new/GPXSee-7.35/lang/gpxsee_ru.ts --- old/GPXSee-7.34/lang/gpxsee_ru.ts 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/lang/gpxsee_ru.ts 2020-10-27 20:52:29.000000000 +0100 @@ -531,7 +531,7 @@ <message> <location filename="../src/GUI/gui.cpp" line="682"/> <source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at %1.</source> - <translation>GPXSee распространяется в соответствиями с условиями версии 3 Стандартной Общественной Лицензии GNU. Для получения дополнительной информации о GPXSee посетите страницу проекта %1.</translation> + <translation>GPXSee распространяется в соответствии с условиями GNU General Public License 3 версии. Для получения дополнительной информации о GPXSee посетите страницу проекта %1.</translation> </message> <message> <location filename="../src/GUI/gui.cpp" line="709"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/lang/gpxsee_uk.ts new/GPXSee-7.35/lang/gpxsee_uk.ts --- old/GPXSee-7.34/lang/gpxsee_uk.ts 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/lang/gpxsee_uk.ts 2020-10-27 20:52:29.000000000 +0100 @@ -1530,7 +1530,7 @@ <message> <location filename="../src/GUI/pdfexportdialog.cpp" line="62"/> <source>cm</source> - <translation type="unfinished"></translation> + <translation>см</translation> </message> <message> <location filename="../src/GUI/pdfexportdialog.cpp" line="68"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/pkg/gpxsee.nsi new/GPXSee-7.35/pkg/gpxsee.nsi --- old/GPXSee-7.34/pkg/gpxsee.nsi 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/pkg/gpxsee.nsi 2020-10-27 20:52:29.000000000 +0100 @@ -7,7 +7,7 @@ ; The name of the installer Name "GPXSee" ; Program version -!define VERSION "7.34" +!define VERSION "7.35" ; The file to write OutFile "GPXSee-${VERSION}.exe" @@ -17,6 +17,9 @@ ; Required execution level RequestExecutionLevel admin +; Don't let the OS scale(blur) the installer GUI +ManifestDPIAware true + ; The default installation directory InstallDir "$PROGRAMFILES\GPXSee" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/pkg/gpxsee64.nsi new/GPXSee-7.35/pkg/gpxsee64.nsi --- old/GPXSee-7.34/pkg/gpxsee64.nsi 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/pkg/gpxsee64.nsi 2020-10-27 20:52:29.000000000 +0100 @@ -7,7 +7,7 @@ ; The name of the installer Name "GPXSee" ; Program version -!define VERSION "7.34" +!define VERSION "7.35" ; The file to write OutFile "GPXSee-${VERSION}_x64.exe" @@ -17,6 +17,9 @@ ; Required execution level RequestExecutionLevel admin +; Don't let the OS scale(blur) the installer GUI +ManifestDPIAware true + ; The default installation directory InstallDir "$PROGRAMFILES64\GPXSee" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/GUI/settings.h new/GPXSee-7.35/src/GUI/settings.h --- old/GPXSee-7.34/src/GUI/settings.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/GUI/settings.h 2020-10-27 20:52:29.000000000 +0100 @@ -141,7 +141,7 @@ #define PATH_AA_SETTING "pathAntiAliasing" #define PATH_AA_DEFAULT true #define GRAPH_AA_SETTING "graphAntiAliasing" -#define GRAPH_AA_DEFAULT false +#define GRAPH_AA_DEFAULT true #define ELEVATION_FILTER_SETTING "elevationFilter" #define ELEVATION_FILTER_DEFAULT 3 #define SPEED_FILTER_SETTING "speedFilter" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/common/rectc.h new/GPXSee-7.35/src/common/rectc.h --- old/GPXSee-7.34/src/common/rectc.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/common/rectc.h 2020-10-27 20:52:29.000000000 +0100 @@ -15,7 +15,8 @@ bool isNull() const {return _tl.isNull() && _br.isNull();} bool isValid() const - {return (_tl.isValid() && _br.isValid() && _tl != _br);} + {return (_tl.isValid() && _br.isValid() + && _tl.lat() > _br.lat() && _tl.lon() < _br.lon());} Coordinates topLeft() const {return _tl;} Coordinates bottomRight() const {return _br;} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/common/rtree.h new/GPXSee-7.35/src/common/rtree.h --- old/GPXSee-7.34/src/common/rtree.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/common/rtree.h 2020-10-27 20:52:29.000000000 +0100 @@ -1,7 +1,6 @@ #ifndef RTREE_H #define RTREE_H -#include <cstdio> #include <cmath> #include <cstdlib> #include <QtGlobal> @@ -387,10 +386,10 @@ void RTREE_QUAL::Insert(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId) { - #ifdef _DEBUG + #ifndef QT_NO_DEBUG for (int index=0; index<NUMDIMS; ++index) Q_ASSERT(a_min[index] <= a_max[index]); - #endif //_DEBUG + #endif // QT_NO_DEBUG Rect rect; @@ -407,10 +406,10 @@ void RTREE_QUAL::Remove(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], const DATATYPE& a_dataId) { - #ifdef _DEBUG + #ifndef QT_NO_DEBUG for (int index=0; index<NUMDIMS; ++index) Q_ASSERT(a_min[index] <= a_max[index]); - #endif //_DEBUG + #endif // QT_NO_DEBUG Rect rect; @@ -427,10 +426,10 @@ int RTREE_QUAL::Search(const ELEMTYPE a_min[NUMDIMS], const ELEMTYPE a_max[NUMDIMS], bool a_resultCallback(DATATYPE a_data, void* a_context), void* a_context) const { - #ifdef _DEBUG + #ifndef QT_NO_DEBUG for (int index=0; index<NUMDIMS; ++index) Q_ASSERT(a_min[index] <= a_max[index]); - #endif //_DEBUG + #endif // QT_NO_DEBUG Rect rect; @@ -636,10 +635,10 @@ { Q_ASSERT(a_rect && a_root); Q_ASSERT(a_level >= 0 && a_level <= (*a_root)->m_level); - #ifdef _DEBUG + #ifndef QT_NO_DEBUG for (int index=0; index < NUMDIMS; ++index) Q_ASSERT(a_rect->m_min[index] <= a_rect->m_max[index]); - #endif //_DEBUG + #endif // QT_NO_DEBUG Node* newRoot; Node* newNode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/common/tifffile.h new/GPXSee-7.35/src/common/tifffile.h --- old/GPXSee-7.34/src/common/tifffile.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/common/tifffile.h 2020-10-27 20:52:29.000000000 +0100 @@ -33,18 +33,18 @@ return false; #if Q_BYTE_ORDER == Q_BIG_ENDIAN - if (_be) - val = data; - else { - for (size_t i = 0; i < sizeof(T); i++) - *((char *)&val + i) = *((char*)&data + sizeof(T) - 1 - i); - } + if (_be) + val = data; + else { + for (size_t i = 0; i < sizeof(T); i++) + *((char *)&val + i) = *((char*)&data + sizeof(T) - 1 - i); + } #else - if (_be) { - for (size_t i = 0; i < sizeof(T); i++) - *((char *)&val + i) = *((char*)&data + sizeof(T) - 1 - i); - } else - val = data; + if (_be) { + for (size_t i = 0; i < sizeof(T); i++) + *((char *)&val + i) = *((char*)&data + sizeof(T) - 1 - i); + } else + val = data; #endif return true; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/bitstream.cpp new/GPXSee-7.35/src/map/IMG/bitstream.cpp --- old/GPXSee-7.34/src/map/IMG/bitstream.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/bitstream.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -12,6 +12,22 @@ return true; } +bool BitStream1::readUInt24(quint32 &val) +{ + quint8 b; + + val = 0; + + for (int i = 0; i < 3; i++) { + if (!read(8, b)) + return false; + val |= (b << (i * 8)); + } + + return true; +} + + bool BitStream4F::flush() { if (_length && !_file.seek(_hdl, _file.pos(_hdl) + _length)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/bitstream.h new/GPXSee-7.35/src/map/IMG/bitstream.h --- old/GPXSee-7.34/src/map/IMG/bitstream.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/bitstream.h 2020-10-27 20:52:29.000000000 +0100 @@ -12,6 +12,8 @@ bool flush(); quint64 bitsAvailable() const {return (quint64)_length * 8 + _remaining;} + bool readUInt24(quint32 &val); + private: const SubFile &_file; SubFile::Handle &_hdl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/lblfile.cpp new/GPXSee-7.35/src/map/IMG/lblfile.cpp --- old/GPXSee-7.34/src/map/IMG/lblfile.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/lblfile.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -161,7 +161,7 @@ } else if (c <= 0x07) { shieldType = static_cast<Label::Shield::Type>(c); bap = &shieldLabel; - } else if (bap == &shieldLabel && QChar(c).isSpace()) { + } else if (bap == &shieldLabel && c == 0x20) { bap = &label; } else bap->append(c); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/mapdata.h new/GPXSee-7.35/src/map/IMG/mapdata.h --- old/GPXSee-7.34/src/map/IMG/mapdata.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/mapdata.h 2020-10-27 20:52:29.000000000 +0100 @@ -38,7 +38,6 @@ Coordinates coordinates; Label label; quint32 type; - bool poi; quint64 id; bool operator<(const Point &other) const @@ -95,8 +94,7 @@ #ifndef QT_NO_DEBUG inline QDebug operator<<(QDebug dbg, const MapData::Point &point) { - dbg.nospace() << "Point(" << hex << point.type << ", " << point.label - << ", " << point.poi << ")"; + dbg.nospace() << "Point(" << hex << point.type << ", " << point.label << ")"; return dbg.space(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/netfile.cpp new/GPXSee-7.35/src/map/IMG/netfile.cpp --- old/GPXSee-7.34/src/map/IMG/netfile.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/netfile.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -352,21 +352,19 @@ return false; BitStream1 bs(*this, hdl, size); - quint32 flags, b, labelPtr = 0; + quint32 flags, labelPtr; if (!bs.read(8, flags)) return false; - for (int i = 0; i < 3; i++) { - if (!bs.read(8, b)) - return false; - labelPtr |= (b << (i * 8)); - } + if (!(flags & 1)) + return true; - if (lbl && (labelPtr & 0x3FFFFF)) { + if (!bs.readUInt24(labelPtr)) + return false; + if (labelPtr & 0x3FFFFF) { if (labelPtr & 0x400000) { quint32 lblOff; if (lblOffset(hdl, labelPtr & 0x3FFFFF, lblOff) && lblOff) label = lbl->label(lblHdl, lblOff); - } else label = lbl->label(lblHdl, labelPtr & 0x3FFFFF); } @@ -401,7 +399,7 @@ bool NETFile::link(const SubDiv *subdiv, quint32 shift, Handle &hdl, NODFile *nod, Handle &nodHdl, LBLFile *lbl, Handle &lblHdl, - const NODFile::BlockInfo blockInfo, quint8 linkId, quint8 lineId, + const NODFile::BlockInfo &blockInfo, quint8 linkId, quint8 lineId, const HuffmanTable &table, QList<IMG::Poly> *lines) { if (!_init && !init(hdl)) @@ -489,8 +487,9 @@ return false; } - linkLabel(hdl, linkOffset, _linksSize - (linkOffset - _linksOffset), lbl, - lblHdl, poly.label); + if (lbl) + linkLabel(hdl, linkOffset, _linksSize - (linkOffset - _linksOffset), + lbl, lblHdl, poly.label); lines->append(poly); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/netfile.h new/GPXSee-7.35/src/map/IMG/netfile.h --- old/GPXSee-7.34/src/map/IMG/netfile.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/netfile.h 2020-10-27 20:52:29.000000000 +0100 @@ -25,7 +25,7 @@ bool lblOffset(Handle &hdl, quint32 netOffset, quint32 &lblOffset); bool link(const SubDiv *subdiv, quint32 shift, Handle &hdl, NODFile *nod, Handle &nodHdl, LBLFile *lbl, Handle &lblHdl, - const NODFile::BlockInfo blockInfo, quint8 linkId, quint8 lineId, + const NODFile::BlockInfo &blockInfo, quint8 linkId, quint8 lineId, const HuffmanTable &table, QList<IMG::Poly> *lines); private: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/rastertile.cpp new/GPXSee-7.35/src/map/IMG/rastertile.cpp --- old/GPXSee-7.34/src/map/IMG/rastertile.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/rastertile.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -28,7 +28,7 @@ case Style::Food: case Style::Shopping: case Style::Services: - return 27; + return 26; case Style::Accommodation: case Style::Recreation: return 25; @@ -237,10 +237,28 @@ textItems.at(i)->paint(painter); } +static void removeDuplicitLabel(QList<TextItem *> &labels, const QString &text, + const QRectF &tileRect) +{ + for (int i = 0; i < labels.size(); i++) { + TextItem *item = labels.at(i); + if (tileRect.contains(item->boundingRect()) && *(item->text()) == text) { + labels.removeAt(i); + delete item; + return; + } + } +} + void RasterTile::processPolygons(QList<TextItem*> &textItems) { + QRectF tileRect(_xy, _img.size()); + QSet<QString> set; + QList<TextItem *> labels; + for (int i = 0; i < _polygons.size(); i++) { MapData::Poly &poly = _polygons[i]; + bool exists = set.contains(poly.label.text()); if (poly.label.text().isEmpty()) continue; @@ -253,12 +271,20 @@ centroid(poly.points).toPoint(), &poly.label.text(), poiFont(), 0, &style.brush().color()); if (item->isValid() && !item->collides(textItems) - && rectNearPolygon(poly.points, item->boundingRect())) - textItems.append(item); - else + && !item->collides(labels) + && !(exists && tileRect.contains(item->boundingRect())) + && rectNearPolygon(poly.points, item->boundingRect())) { + if (exists) + removeDuplicitLabel(labels, poly.label.text(), tileRect); + else + set.insert(poly.label.text()); + labels.append(item); + } else delete item; } } + + textItems.append(labels); } void RasterTile::processLines(QList<TextItem*> &textItems) @@ -372,14 +398,15 @@ for (int i = 0; i < _points.size(); i++) { MapData::Point &point = _points[i]; const Style::Point &style = _style->point(point.type); + bool poi = Style::isPOI(point.type); - if (point.poi && _zoom < minPOIZoom(Style::poiClass(point.type))) + if (poi && _zoom < minPOIZoom(Style::poiClass(point.type))) continue; const QString *label = point.label.text().isEmpty() ? 0 : &(point.label.text()); const QImage *img = style.img().isNull() ? 0 : &style.img(); - const QFont *fnt = point.poi + const QFont *fnt = poi ? poiFont(style.textFontSize()) : font(style.textFontSize()); const QColor *color = style.textColor().isValid() ? &style.textColor() : 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/rgnfile.cpp new/GPXSee-7.35/src/map/IMG/rgnfile.cpp --- old/GPXSee-7.34/src/map/IMG/rgnfile.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/rgnfile.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -362,10 +362,9 @@ point.type = (quint16)type<<8 | subtype; point.coordinates = Coordinates(toWGS24(pos.x()), toWGS24(pos.y())); point.id = pointId(pos, point.type, labelPtr & 0x3FFFFF); - point.poi = labelPtr & 0x400000; if (lbl && (labelPtr & 0x3FFFFF)) - point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi, - !(point.type == 0x1400 || point.type == 0x1500 + point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, + labelPtr & 0x400000, !(point.type == 0x1400 || point.type == 0x1500 || point.type == 0x1e00)); points->append(point); @@ -414,9 +413,8 @@ point.coordinates = Coordinates(toWGS24(pos.x()), toWGS24(pos.y())); point.id = pointId(pos, point.type, labelPtr & 0x3FFFFF); - point.poi = labelPtr & 0x400000; if (lbl && (labelPtr & 0x3FFFFF)) - point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi); + point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, false); points->append(point); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/style.cpp new/GPXSee-7.35/src/map/IMG/style.cpp --- old/GPXSee-7.34/src/map/IMG/style.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/style.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -39,9 +39,7 @@ _polygons[TYPE(0x1f)] = Polygon(QBrush(QColor("#9ac269"), Qt::BDiagPattern)); _polygons[TYPE(0x28)] = Polygon(QBrush("#9fc4e1")); - _polygons[TYPE(0x29)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x32)] = Polygon(QBrush("#9fc4e1")); - _polygons[TYPE(0x3b)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x3c)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x3d)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x3e)] = Polygon(QBrush("#9fc4e1")); @@ -51,13 +49,12 @@ _polygons[TYPE(0x42)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x43)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x44)] = Polygon(QBrush("#9fc4e1")); - _polygons[TYPE(0x45)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x46)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x47)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x48)] = Polygon(QBrush("#9fc4e1")); _polygons[TYPE(0x49)] = Polygon(QBrush("#9fc4e1")); - _polygons[TYPE(0x4b)] = Polygon(QBrush("#f1f0e5"), QPen("#f1f0e5")); _polygons[TYPE(0x4a)] = Polygon(QBrush("#f1f0e5"), QPen("#f1f0e5")); + _polygons[TYPE(0x4b)] = Polygon(QBrush("#f1f0e5"), QPen("#f1f0e5")); _polygons[TYPE(0x4c)] = Polygon(QBrush("#9fc4e1", Qt::Dense6Pattern)); _polygons[TYPE(0x4d)] = Polygon(QBrush("#ddf1fd")); _polygons[TYPE(0x4e)] = Polygon(QBrush("#f8f8f8")); @@ -66,18 +63,73 @@ _polygons[TYPE(0x51)] = Polygon(QBrush("#9fc4e1", Qt::Dense4Pattern)); _polygons[TYPE(0x52)] = Polygon(QBrush("#cadfaf")); - _drawOrder << TYPE(0x4b) << TYPE(0x4a) << TYPE(0x01) << TYPE(0x02) - << TYPE(0x03) << TYPE(0x17) << TYPE(0x18) << TYPE(0x1a) << TYPE(0x28) - << TYPE(0x29) << TYPE(0x32) << TYPE(0x3b) << TYPE(0x3c) << TYPE(0x3d) - << TYPE(0x3e) << TYPE(0x3f) << TYPE(0x40) << TYPE(0x41) << TYPE(0x42) - << TYPE(0x43) << TYPE(0x44) << TYPE(0x45) << TYPE(0x46) << TYPE(0x47) - << TYPE(0x48) << TYPE(0x49) << TYPE(0x4c) << TYPE(0x4d) << TYPE(0x4e) - << TYPE(0x4f) << TYPE(0x50) << TYPE(0x51) << TYPE(0x52) << TYPE(0x14) - << TYPE(0x15) << TYPE(0x16) << TYPE(0x1e) << TYPE(0x1f) << TYPE(0x04) - << TYPE(0x05) << TYPE(0x06) << TYPE(0x07) << TYPE(0x08) << TYPE(0x09) - << TYPE(0x0a) << TYPE(0x0b) << TYPE(0x0c) << TYPE(0x0d) << TYPE(0x0e) - << TYPE(0x0f) << TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x19) - << TYPE(0x13); + // NT types + _polygons[0x10800] = _polygons[TYPE(0x01)]; + _polygons[0x10801] = _polygons[TYPE(0x02)]; + _polygons[0x10802] = _polygons[TYPE(0x03)]; + _polygons[0x10901] = _polygons[TYPE(0x04)]; + _polygons[0x10902] = _polygons[TYPE(0x05)]; + _polygons[0x10903] = _polygons[TYPE(0x06)]; + _polygons[0x10904] = _polygons[TYPE(0x07)]; + _polygons[0x10905] = _polygons[TYPE(0x08)]; + _polygons[0x10906] = _polygons[TYPE(0x09)]; + _polygons[0x10907] = _polygons[TYPE(0x0a)]; + _polygons[0x10908] = _polygons[TYPE(0x0b)]; + _polygons[0x10909] = _polygons[TYPE(0x0c)]; + _polygons[0x1090a] = _polygons[TYPE(0x0d)]; + _polygons[0x1090b] = _polygons[TYPE(0x0e)]; + _polygons[0x10900] = _polygons[TYPE(0x13)]; + _polygons[0x10a01] = _polygons[TYPE(0x14)]; + _polygons[0x10a02] = _polygons[TYPE(0x15)]; + _polygons[0x10a03] = _polygons[TYPE(0x16)]; + _polygons[0x10a04] = _polygons[TYPE(0x17)]; + _polygons[0x1090c] = _polygons[TYPE(0x18)]; + _polygons[0x1090d] = _polygons[TYPE(0x19)]; + _polygons[0x1090e] = _polygons[TYPE(0x1a)]; + _polygons[0x10a05] = _polygons[TYPE(0x1e)]; + _polygons[0x10a06] = _polygons[TYPE(0x1f)]; + _polygons[0x10b01] = _polygons[TYPE(0x28)]; + _polygons[0x10b02] = _polygons[TYPE(0x32)]; + _polygons[0x10b03] = _polygons[TYPE(0x3c)]; + _polygons[0x10b04] = _polygons[TYPE(0x3d)]; + _polygons[0x10b05] = _polygons[TYPE(0x3e)]; + _polygons[0x10b06] = _polygons[TYPE(0x3f)]; + _polygons[0x10b07] = _polygons[TYPE(0x40)]; + _polygons[0x10b08] = _polygons[TYPE(0x41)]; + _polygons[0x10b09] = _polygons[TYPE(0x42)]; + _polygons[0x10b0a] = _polygons[TYPE(0x43)]; + _polygons[0x10b0b] = _polygons[TYPE(0x44)]; + _polygons[0x10b0c] = _polygons[TYPE(0x46)]; + _polygons[0x10b0d] = _polygons[TYPE(0x47)]; + _polygons[0x10b0e] = _polygons[TYPE(0x48)]; + _polygons[0x10b0f] = _polygons[TYPE(0x49)]; + _polygons[0x10d01] = _polygons[TYPE(0x4b)]; + _polygons[0x10b10] = _polygons[TYPE(0x4c)]; + _polygons[0x10c00] = _polygons[TYPE(0x4d)]; + _polygons[0x10c01] = _polygons[TYPE(0x4e)]; + _polygons[0x10c02] = _polygons[TYPE(0x4f)]; + _polygons[0x10c03] = _polygons[TYPE(0x50)]; + _polygons[0x10c04] = _polygons[TYPE(0x51)]; + _polygons[0x10c05] = _polygons[TYPE(0x52)]; + + // Draw order + _drawOrder << TYPE(0x4b) << 0x10d01 << TYPE(0x4a) << TYPE(0x01) << 0x10800 + << TYPE(0x02) << 0x10801 << TYPE(0x03) << 0x10802 << TYPE(0x17) << 0x10a04 + << TYPE(0x18) << 0x1090c << TYPE(0x1a) << 0x1090e << TYPE(0x28) << 0x10b01 + << TYPE(0x32) << 0x10b02 << TYPE(0x3c) << 0x10b03 << TYPE(0x3d) << 0x10b04 + << TYPE(0x3e) << 0x10b05 << TYPE(0x3f) << 0x10b06 << TYPE(0x40) << 0x10b07 + << TYPE(0x41) << 0x10b08 << TYPE(0x42) << 0x10b09 << TYPE(0x43) << 0x10b0a + << TYPE(0x44) << 0x10b0b << TYPE(0x46) << 0x10b0c << TYPE(0x47) << 0x10b0d + << TYPE(0x48) << 0x10b0e << TYPE(0x49) << 0x10b0f << TYPE(0x4c) << 0x10b10 + << TYPE(0x4d) << 0x10c00 << TYPE(0x4e) << 0x10c01 << TYPE(0x4f) << 0x10c02 + << TYPE(0x50) << 0x10c03 << TYPE(0x51) << 0x10c04 << TYPE(0x52) << 0x10c05 + << TYPE(0x14) << 0x10a01 << TYPE(0x15) << 0x10a02 << TYPE(0x16) << 0x10a03 + << TYPE(0x1e) << 0x10a05 << TYPE(0x1f) << 0x10a06 << TYPE(0x04) << 0x10901 + << TYPE(0x05) << 0x10902 << TYPE(0x06) << 0x10903 << TYPE(0x07) << 0x10904 + << TYPE(0x08) << 0x10905 << TYPE(0x09) << 0x10906 << TYPE(0x0a) << 0x10907 + << TYPE(0x0b) << 0x10908 << TYPE(0x0c) << 0x10909 << TYPE(0x0d) << 0x1090a + << TYPE(0x0e) << 0x1090b << TYPE(0x0f) << TYPE(0x10) << TYPE(0x11) + << TYPE(0x12) << TYPE(0x19) << 0x1090d << TYPE(0x13) << 0x10900; } static QImage railroad() @@ -148,6 +200,22 @@ //_lines[TYPE(0x28)] = Line(QPen(QColor("#5a5a5a"), 1, Qt::SolidLine)); _lines[TYPE(0x29)] = Line(QPen(QColor("#5a5a5a"), 1, Qt::SolidLine)); _lines[TYPE(0x29)].setTextFontSize(None); + + // NT types + _lines[0x10c00] = _lines[TYPE(0x14)]; + _lines[0x10a00] = _lines[TYPE(0x18)]; + _lines[0x10b04] = _lines[TYPE(0x1e)]; + _lines[0x10a01] = _lines[TYPE(0x1f)]; + _lines[0x10900] = _lines[TYPE(0x20)]; + _lines[0x10901] = _lines[TYPE(0x21)]; + _lines[0x10902] = _lines[TYPE(0x22)]; + _lines[0x10903] = _lines[TYPE(0x23)]; + _lines[0x10904] = _lines[TYPE(0x24)]; + _lines[0x10905] = _lines[TYPE(0x25)]; + _lines[0x10a02] = _lines[TYPE(0x26)]; + _lines[0x10c02] = _lines[TYPE(0x27)]; + //_lines[0x10c03] = _lines[TYPE(0x28)]; + _lines[0x10c04] = _lines[TYPE(0x29)]; } void Style::defaultPointStyle() @@ -221,10 +289,13 @@ _points[0x2d0b] = Point(QImage(":/airfield-11.png")); _points[0x2e02] = Point(QImage(":/grocery-11.png")); + _points[0x2e03] = Point(QImage(":/shop-11.png")); _points[0x2e05] = Point(QImage(":/pharmacy-11.png")); + _points[0x2e06] = Point(QImage(":/convenience-11.png")); _points[0x2e07] = Point(QImage(":/clothing-store-11.png")); _points[0x2e08] = Point(QImage(":/garden-centre-11.png")); _points[0x2e09] = Point(QImage(":/furniture-11.png")); + _points[0x2e0a] = Point(QImage(":/shop-11.png")); _points[0x2e0c] = Point(QImage(":/shop-11.png")); _points[0x2f01] = Point(QImage(":/fuel-11.png")); @@ -248,7 +319,8 @@ _points[0x3001] = Point(QImage(":/police-11.png")); _points[0x3002] = Point(QImage(":/hospital-11.png")); _points[0x3003] = Point(QImage(":/town-hall-11.png")); - _points[0x3007] = Point(QImage(":/prison-11.png")); + _points[0x3006] = Point(QImage(":/entrance-alt1-11.png")); + _points[0x3007] = Point(QImage(":/town-hall-11.png")); _points[0x3008] = Point(QImage(":/fire-station-11.png")); _points[0x4000] = Point(QImage(":/golf-11.png")); @@ -296,6 +368,87 @@ _points[0x6513] = Point(QImage(":/wetland-11.png")); _points[0x6604] = Point(QImage(":/beach-11.png")); _points[0x6616] = Point(QImage(":/mountain-11.png")); + + + // NT types + _points[0x11401] = _points[TYPE(0x01)]; + _points[0x11402] = _points[TYPE(0x02)]; + _points[0x11403] = _points[TYPE(0x03)]; + _points[0x10b00] = _points[0x2a00]; + _points[0x10b01] = _points[0x2a01]; + _points[0x10b02] = _points[0x2a02]; + _points[0x10b03] = _points[0x2a03]; + _points[0x10b04] = _points[0x2a04]; + _points[0x10b05] = _points[0x2a05]; + _points[0x10b06] = _points[0x2a06]; + _points[0x10b07] = _points[0x2a07]; + _points[0x10b08] = _points[0x2a08]; + _points[0x10b09] = _points[0x2a09]; + _points[0x10b0a] = _points[0x2a0a]; + _points[0x10b0b] = _points[0x2a0b]; + _points[0x10b0c] = _points[0x2a0c]; + _points[0x10b0d] = _points[0x2a0d]; + _points[0x10b0e] = _points[0x2a0e]; + _points[0x10b0f] = _points[0x2a0f]; + _points[0x10b10] = _points[0x2a10]; + _points[0x10b11] = _points[0x2a11]; + _points[0x10c01] = _points[0x2b01]; + _points[0x10c02] = _points[0x2b02]; + _points[0x10c03] = _points[0x2b03]; + _points[0x10c04] = _points[0x2b04]; + _points[0x10d01] = _points[0x2c01]; + _points[0x10d02] = _points[0x2c02]; + _points[0x10d03] = _points[0x2c03]; + _points[0x10d04] = _points[0x2c04]; + _points[0x10d05] = _points[0x2c05]; + _points[0x10d06] = _points[0x2c06]; + _points[0x10d07] = _points[0x2c07]; + _points[0x10d08] = _points[0x2c08]; + _points[0x10d0a] = _points[0x2c0a]; + _points[0x10d0b] = _points[0x2c0b]; + _points[0x10d0d] = _points[0x2c0d]; + _points[0x10d0e] = _points[0x2c0e]; + _points[0x10d10] = _points[0x2c10]; + _points[0x10e01] = _points[0x2d01]; + _points[0x10e02] = _points[0x2d02]; + _points[0x10e03] = _points[0x2d03]; + _points[0x10e04] = _points[0x2d04]; + _points[0x10e05] = _points[0x2d05]; + _points[0x10e06] = _points[0x2d06]; + _points[0x10e07] = _points[0x2d07]; + _points[0x10e08] = _points[0x2d08]; + _points[0x10e09] = _points[0x2d09]; + _points[0x10e0a] = _points[0x2d0a]; + _points[0x10e0b] = _points[0x2d0b]; + _points[0x10f02] = _points[0x2e02]; + _points[0x10f03] = _points[0x2e03]; + _points[0x10f05] = _points[0x2e05]; + _points[0x10f06] = _points[0x2e06]; + _points[0x10f07] = _points[0x2e07]; + _points[0x10f08] = _points[0x2e08]; + _points[0x10f09] = _points[0x2e09]; + _points[0x10f0a] = _points[0x2e0a]; + _points[0x11001] = _points[0x2f01]; + _points[0x11002] = _points[0x2f02]; + _points[0x11003] = _points[0x2f03]; + _points[0x11004] = _points[0x2f04]; + _points[0x11005] = _points[0x2f05]; + _points[0x11006] = _points[0x2f06]; + _points[0x11007] = _points[0x2f07]; + _points[0x11008] = _points[0x2f08]; + _points[0x11009] = _points[0x2f09]; + _points[0x1100b] = _points[0x2f0b]; + _points[0x1100c] = _points[0x2f0c]; + _points[0x11010] = _points[0x2f10]; + _points[0x11012] = _points[0x2f12]; + _points[0x11013] = _points[0x2f13]; + _points[0x11017] = _points[0x2f17]; + _points[0x11101] = _points[0x3001]; + _points[0x11102] = _points[0x3002]; + _points[0x11103] = _points[0x3003]; + _points[0x11106] = _points[0x3006]; + _points[0x11107] = _points[0x3007]; + _points[0x11108] = _points[0x3008]; } static bool readBitmap(SubFile *file, SubFile::Handle &hdl, QImage &img, @@ -985,19 +1138,26 @@ Style::POIClass Style::poiClass(quint32 type) { - if ((type >= 0x2a00 && type < 0x2b00) || type == 0x2c0a || type == 0x2d02) + if ((type >= 0x2a00 && type < 0x2b00) || type == 0x2c0a || type == 0x2d02 + || (type & 0xffff00) == TYPE(0x10b)) return Food; - else if (type >= 0x2b00 && type < 0x2c00) + else if ((type >= 0x2b00 && type < 0x2c00) + || (type & 0xffff00) == TYPE(0x10c)) return Accommodation; - else if (type >= 0x2c00 && type < 0x2e00) + else if ((type >= 0x2c00 && type < 0x2e00) + || (type & 0xffff00) == TYPE(0x10d) || (type & 0xffff00) == TYPE(0x10e)) return Recreation; - else if (type >= 0x2e00 && type < 0x2f00) + else if ((type >= 0x2e00 && type < 0x2f00) + || (type & 0xffff00) == TYPE(0x10f)) return Shopping; - else if ((type >= 0x2f00 && type < 0x2f0f) || type == 0x2f17) + else if ((type >= 0x2f00 && type < 0x2f0f) || type == 0x2f17 + || (type >= 0x11001 && type < 0x1100f)) return Transport; - else if (type >= 0x2f0f && type < 0x3000) + else if ((type >= 0x2f0f && type < 0x3000) + || (type >= 0x1100f && type < 0x11100)) return Services; - else if (type >= 0x3000 && type < 0x3100) + else if ((type >= 0x3000 && type < 0x3100) + || (type & 0xffff00) == TYPE(0x111)) return Community; else if (type >= 0x4000 && type < 0x6000) return Elementary; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/style.h new/GPXSee-7.35/src/map/IMG/style.h --- old/GPXSee-7.34/src/map/IMG/style.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/style.h 2020-10-27 20:52:29.000000000 +0100 @@ -108,15 +108,19 @@ const Point &point(quint32 type) const; const QList<quint32> &drawOrder() const {return _drawOrder;} + static bool isPOI(quint32 type) + {return !((type >= TYPE(0x01) && type <= TYPE(0x1f)) + || (type >= 0x11400 && type < 0x11500));} static bool isContourLine(quint32 type) {return ((type >= TYPE(0x20) && type <= TYPE(0x25)) || (type & 0xffff00) == TYPE(0x109));} static bool isWaterArea(quint32 type) - {return (type >= TYPE(0x3c) && type <= TYPE(0x44));} + {return ((type >= TYPE(0x3c) && type <= TYPE(0x44)) + || (type & 0xffff00) == TYPE(0x10b));} static bool isMilitaryArea(quint32 type) - {return (type == TYPE(0x04));} + {return (type == TYPE(0x04) || type == 0x10901);} static bool isNatureReserve(quint32 type) - {return (type == TYPE(0x16));} + {return (type == TYPE(0x16) || type == 0x10a03);} static bool isSpot(quint32 type) {return (type == TYPE(0x62) || type == TYPE(0x63));} static bool isSummit(quint32 type) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/textitem.h new/GPXSee-7.35/src/map/IMG/textitem.h --- old/GPXSee-7.34/src/map/IMG/textitem.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/textitem.h 2020-10-27 20:52:29.000000000 +0100 @@ -10,13 +10,18 @@ class TextItem { public: + TextItem(const QString *text) : _text(text) {} virtual ~TextItem() {} virtual QPainterPath shape() const = 0; virtual QRectF boundingRect() const = 0; virtual void paint(QPainter *painter) const = 0; + const QString *text() const {return _text;} bool collides(const QList<TextItem*> &list) const; + +protected: + const QString *_text; }; #endif // TEXTITEM_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/textpathitem.cpp new/GPXSee-7.35/src/map/IMG/textpathitem.cpp --- old/GPXSee-7.34/src/map/IMG/textpathitem.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/textpathitem.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -137,7 +137,7 @@ TextPathItem::TextPathItem(const QPolygonF &line, const QString *label, const QRect &tileRect, const QFont *font, const QColor *color) - : _text(label), _font(font), _color(color) + : TextItem(label), _font(font), _color(color) { qreal cw = font->pixelSize() * 0.7; qreal textWidth = _text->size() * cw; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/textpathitem.h new/GPXSee-7.35/src/map/IMG/textpathitem.h --- old/GPXSee-7.34/src/map/IMG/textpathitem.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/textpathitem.h 2020-10-27 20:52:29.000000000 +0100 @@ -8,7 +8,7 @@ class TextPathItem : public TextItem { public: - TextPathItem() : _text(0), _font(0), _color(0) {} + TextPathItem() : TextItem(0), _font(0), _color(0) {} TextPathItem(const QPolygonF &line, const QString *label, const QRect &tileRect, const QFont *font, const QColor *color); @@ -19,7 +19,6 @@ void paint(QPainter *painter) const; private: - const QString *_text; const QFont *_font; const QColor *_color; QPainterPath _path; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/textpointitem.cpp new/GPXSee-7.35/src/map/IMG/textpointitem.cpp --- old/GPXSee-7.34/src/map/IMG/textpointitem.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/textpointitem.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -17,7 +17,7 @@ TextPointItem::TextPointItem(const QPoint &point, const QString *text, const QFont *font, const QImage *img, const QColor *color, - const QColor *bgColor) : _text(font ? text : 0), _font(font), _img(img), + const QColor *bgColor) : TextItem(font ? text : 0), _font(font), _img(img), _color(color), _bgColor(bgColor) { if (_text) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/textpointitem.h new/GPXSee-7.35/src/map/IMG/textpointitem.h --- old/GPXSee-7.34/src/map/IMG/textpointitem.h 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/textpointitem.h 2020-10-27 20:52:29.000000000 +0100 @@ -14,7 +14,7 @@ class TextPointItem : public TextItem { public: - TextPointItem() : _text(0), _font(0), _img(0) {} + TextPointItem() : TextItem(0), _font(0), _img(0) {} TextPointItem(const QPoint &point, const QString *text, const QFont *font, const QImage *img, const QColor *color, const QColor *bgColor = 0); @@ -27,7 +27,6 @@ void setPos(const QPoint &point); private: - const QString *_text; const QFont *_font; const QImage *_img; const QColor *_color, *_bgColor; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/IMG/trefile.cpp new/GPXSee-7.35/src/map/IMG/trefile.cpp --- old/GPXSee-7.34/src/map/IMG/trefile.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/IMG/trefile.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -5,7 +5,12 @@ static inline double RB(qint32 val) { - return (val == -0x800000 || val == 0x800000) ? 180.0 : toWGS24(val); + return (val == -0x800000 || val >= 0x800000) ? 180.0 : toWGS24(val); +} + +static inline double LB(qint32 val) +{ + return (val <= -0x800000) ? -180.0 : toWGS24(val); } static void demangle(quint8 *data, quint32 size, quint32 key) @@ -60,7 +65,8 @@ return false; _bounds = RectC(Coordinates(toWGS24(west), toWGS24(north)), Coordinates(RB(east), toWGS24(south))); - Q_ASSERT(_bounds.left() <= _bounds.right()); + if (!_bounds.isValid()) + return false; // Levels & subdivs info quint32 levelsOffset, levelsSize, subdivSize; @@ -187,15 +193,17 @@ width &= 0x7FFF; width = LS(width, 24 - level.bits); + height &= 0x7FFF; height = LS(height, 24 - level.bits); s = new SubDiv(offset, lon, lat, level.level, level.bits, objects); sl.append(s); double min[2], max[2]; - RectC bounds(Coordinates(toWGS24(lon - width), toWGS24(lat + height)), + RectC bounds(Coordinates(LB(lon - width), toWGS24(lat + height)), Coordinates(RB(lon + width), toWGS24(lat - height))); - Q_ASSERT(bounds.left() <= bounds.right()); + if (!bounds.isValid()) + goto error; min[0] = bounds.left(); min[1] = bounds.bottom(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/crs.cpp new/GPXSee-7.35/src/map/crs.cpp --- old/GPXSee-7.34/src/map/crs.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/crs.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -28,7 +28,7 @@ return Projection(); } - if (authority == "EPSG") { + if (!authority.compare("EPSG", Qt::CaseInsensitive)) { epsg = code.toInt(&res); if (!res) return Projection(); @@ -39,7 +39,7 @@ return Projection(gcs); else return Projection(); - } else if (authority == "OGC") { + } else if (!authority.compare("OGC", Qt::CaseInsensitive)) { if (code == "CRS84") return Projection(GCS::gcs(4326), CoordinateSystem::XY); else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/geotiff.cpp new/GPXSee-7.35/src/map/geotiff.cpp --- old/GPXSee-7.34/src/map/geotiff.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/geotiff.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -61,19 +61,19 @@ ((map).contains(key) && (map).value(key).SHORT != 32767) -typedef struct { +struct GeoKeyHeader { quint16 KeyDirectoryVersion; quint16 KeyRevision; quint16 MinorRevision; quint16 NumberOfKeys; -} Header; +}; -typedef struct { +struct GeoKeyEntry { quint16 KeyID; quint16 TIFFTagLocation; quint16 Count; quint16 ValueOffset; -} KeyEntry; +}; bool GeoTIFF::readEntry(TIFFFile &file, Ctx &ctx) const @@ -196,8 +196,8 @@ bool GeoTIFF::readKeys(TIFFFile &file, Ctx &ctx, QMap<quint16, Value> &kv) const { - Header header; - KeyEntry entry; + GeoKeyHeader header; + GeoKeyEntry entry; Value value; if (!file.seek(ctx.keys)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/imgmap.cpp new/GPXSee-7.35/src/map/imgmap.cpp --- old/GPXSee-7.34/src/map/imgmap.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/imgmap.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -136,6 +136,9 @@ RectD prect(_dataBounds, _projection); _bounds = QRectF(_transform.proj2img(prect.topLeft()), _transform.proj2img(prect.bottomRight())); + // Adjust the bounds of world maps to avoid problems with wrapping + if (_dataBounds.left() == -180.0 || _dataBounds.right() == 180.0) + _bounds.adjust(0.5, 0, -0.5, 0); } QPointF IMGMap::ll2xy(const Coordinates &c) @@ -194,7 +197,7 @@ QRectF polyRect(ttl, QPointF(ttl.x() + TILE_SIZE, ttl.y() + TILE_SIZE)); - polyRect &= bounds().adjusted(0.5, 0.5, -0.5, -0.5); + polyRect &= bounds(); RectD polyRectD(_transform.img2proj(polyRect.topLeft()), _transform.img2proj(polyRect.bottomRight())); _data.at(n)->polys(polyRectD.toRectC(_projection, 4), _zoom, @@ -204,7 +207,7 @@ QRectF pointRect(QPointF(ttl.x() - TEXT_EXTENT, ttl.y() - TEXT_EXTENT), QPointF(ttl.x() + TILE_SIZE + TEXT_EXTENT, ttl.y() + TILE_SIZE + TEXT_EXTENT)); - pointRect &= bounds().adjusted(0.5, 0.5, -0.5, -0.5); + pointRect &= bounds(); RectD pointRectD(_transform.img2proj(pointRect.topLeft()), _transform.img2proj(pointRect.bottomRight())); _data.at(n)->points(pointRectD.toRectC(_projection, 4), @@ -241,7 +244,7 @@ _projection = projection; // Limit the bounds for some well known Mercator projections - // (GARMIN world maps have N/S bounds up to 90/-90!) + // (world maps have N/S bounds up to 90/-90!) _dataBounds = (_projection == PCS::pcs(3857) || _projection == PCS::pcs(3395)) ? _data.first()->bounds() & OSM::BOUNDS : _data.first()->bounds(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/GPXSee-7.34/src/map/tar.cpp new/GPXSee-7.35/src/map/tar.cpp --- old/GPXSee-7.34/src/map/tar.cpp 2020-10-09 05:22:55.000000000 +0200 +++ new/GPXSee-7.35/src/map/tar.cpp 2020-10-27 20:52:29.000000000 +0100 @@ -9,7 +9,7 @@ #define BLOCKCOUNT(size) \ ((size)/BLOCKSIZE + ((size) % BLOCKSIZE > 0 ? 1 : 0)) -struct Header +struct TARHeader { char name[100]; /* 0 */ char mode[8]; /* 100 */ @@ -61,7 +61,7 @@ bool Tar::loadTar() { char buffer[BLOCKSIZE]; - struct Header *hdr = (struct Header*)&buffer; + TARHeader *hdr = (TARHeader*)&buffer; quint64 size; qint64 ret; @@ -113,7 +113,7 @@ QByteArray Tar::file(const QString &name) { char buffer[BLOCKSIZE]; - struct Header *hdr = (struct Header*)&buffer; + TARHeader *hdr = (TARHeader*)&buffer; quint64 size; QMap<QString, quint64>::const_iterator it(_index.find(name)); ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.4IHZen/_old 2020-10-28 11:26:27.038914736 +0100 +++ /var/tmp/diff_new_pack.4IHZen/_new 2020-10-28 11:26:27.038914736 +0100 @@ -1,5 +1,5 @@ pkgname=gpxsee -pkgver=7.34 +pkgver=7.35 pkgrel=1 pkgdesc='GPS log files visualizing and analyzing tool' arch=('i686' 'x86_64') ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.4IHZen/_old 2020-10-28 11:26:27.058914757 +0100 +++ /var/tmp/diff_new_pack.4IHZen/_new 2020-10-28 11:26:27.062914762 +0100 @@ -1,3 +1,11 @@ +gpxsee (7.35) stable; urgency=low + + * IMG format compatability, performance and layout improvements. + * Fixed CRS entries parsing (WMS, WMTS) + * Various minor bug fixes. + + -- Martin Tuma <tu...@cbox.cz> Tue, 27 Oct 2020 21:39:44 +0100 + gpxsee (7.34) stable; urgency=medium * Fixed application icons paths. ++++++ gpxsee.dsc ++++++ --- /var/tmp/diff_new_pack.4IHZen/_old 2020-10-28 11:26:27.114914817 +0100 +++ /var/tmp/diff_new_pack.4IHZen/_new 2020-10-28 11:26:27.118914822 +0100 @@ -1,9 +1,9 @@ Format: 1.0 Source: gpxsee -Version: 7.34-1 +Version: 7.35-1 Binary: gpxsee Maintainer: Martin Tuma <tu...@cbox.cz> Architecture: any Build-Depends: debhelper (>= 9), qtbase5-dev, qtbase5-dev-tools, qt5-qmake, qttools5-dev-tools, libqt5opengl5-dev Files: - 00000000000000000000000000000000 0 GPXSee-7.34.tar.gz + 00000000000000000000000000000000 0 GPXSee-7.35.tar.gz