diff --git a/.appveyor.yml b/.appveyor.yml index 82250587..f15e9971 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,4 +1,4 @@ -version: 13.37.{build} +version: 13.38.{build} configuration: - Release @@ -8,6 +8,7 @@ image: environment: NSISDIR: C:\Program Files (x86)\NSIS + JOMDIR: C:\Qt\Tools\QtCreator\bin\jom matrix: - QTDIR: C:\Qt\5.15\msvc2019_64 OPENSSLDIR: C:\OpenSSL-v111-Win64\bin @@ -17,14 +18,14 @@ environment: install: - cmd: |- - set PATH=%QTDIR%\bin;%NSISDIR%;%PATH% + set PATH=%QTDIR%\bin;%NSISDIR%;%JOMDIR%;%PATH% call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat build_script: - cmd: |- lrelease gpxsee.pro qmake gpxsee.pro - nmake release + jom release md installer copy release\GPXSee.exe installer diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e5eed0fa..927c4294 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -43,7 +43,7 @@ jobs: - name: Configure build run: qmake gpxsee.pro OPENSSL_PATH=android_openssl - name: Build project - run: make -j2 apk + run: make -j4 apk - name: Upload artifacts uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 61287ae7..bb90f0f2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -24,4 +24,4 @@ jobs: - name: Configure build run: qmake CONFIG+=${{ matrix.config }} gpxsee.pro - name: Build project - run: make -j2 + run: make -j4 diff --git a/README.md b/README.md index 2a120cf3..a9c83c7c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ GPS log file formats. ## Features * Opens GPX, TCX, FIT, KML, NMEA, IGC, CUP, SIGMA SLF, Suunto SML, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), Garmin GPI&CSV, TomTom OV2&ITN, ONmove OMD/GHP, - TwoNav (TRK, RTE, WPT), GPSDump WPT, 70mai GPS logs and geotagged JPEG files. + TwoNav (TRK, RTE, WPT), GPSDump WPT, Velocitek VTK, 70mai GPS logs and geotagged + JPEG files. * Opens geo URIs (RFC 5870). * User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS, QuadTiles). diff --git a/data/style/style.xml b/data/style/style.xml index 285619fc..644d2bd9 100644 --- a/data/style/style.xml +++ b/data/style/style.xml @@ -214,10 +214,11 @@ - + - + + @@ -403,7 +404,7 @@ - + @@ -428,6 +429,12 @@ + + + + + + diff --git a/gpxsee.pro b/gpxsee.pro index be04573e..567efc7e 100644 --- a/gpxsee.pro +++ b/gpxsee.pro @@ -3,7 +3,7 @@ unix:!macx:!android { } else { TARGET = GPXSee } -VERSION = 13.37 +VERSION = 13.38 QT += core \ gui \ @@ -118,6 +118,7 @@ HEADERS += src/common/config.h \ src/data/style.h \ src/data/twonavparser.h \ src/data/txtparser.h \ + src/data/vtkparser.h \ src/map/ENC/data.h \ src/map/IMG/light.h \ src/map/downloader.h \ @@ -346,6 +347,7 @@ SOURCES += src/main.cpp \ src/GUI/projectioncombobox.cpp \ src/GUI/passwordedit.cpp \ src/data/txtparser.cpp \ + src/data/vtkparser.cpp \ src/map/downloader.cpp \ src/map/demloader.cpp \ src/map/ENC/atlasdata.cpp \ @@ -561,7 +563,8 @@ win32 { icons/formats/trk.ico \ icons/formats/gemf.ico \ icons/formats/000.ico \ - icons/formats/031.ico + icons/formats/031.ico \ + icons/formats/vtk.ico DEFINES += _USE_MATH_DEFINES \ NOGDI } diff --git a/icons/formats/scripts/extensions b/icons/formats/scripts/extensions index fe2efac9..9548ca02 100644 --- a/icons/formats/scripts/extensions +++ b/icons/formats/scripts/extensions @@ -32,3 +32,4 @@ trk:#cccccc gemf:#147085 000:#000000 031:#000000 +vtk:#632433 diff --git a/icons/formats/vtk.icns b/icons/formats/vtk.icns new file mode 100644 index 00000000..b6f6ab28 Binary files /dev/null and b/icons/formats/vtk.icns differ diff --git a/icons/formats/vtk.ico b/icons/formats/vtk.ico new file mode 100644 index 00000000..ce743567 Binary files /dev/null and b/icons/formats/vtk.ico differ diff --git a/lang/gpxsee_ca.ts b/lang/gpxsee_ca.ts index 252fe279..38cd993d 100644 --- a/lang/gpxsee_ca.ts +++ b/lang/gpxsee_ca.ts @@ -70,117 +70,122 @@ Data - + Supported files Fitxers compatibles - + CSV files Fitxers CSV - + CUP files Fitxers CUP - + FIT files Fitxers FIT - + GeoJSON files Fitxers GeoJSON - + GPI files Fitxers GPI - + GPX files Fitxers GPX - + IGC files Fitxers IGC - + ITN files Fitxers ITN - + JPEG images Imatges JPEG - + KML files Fitxers KML - + LOC files Fitxers LOC - + NMEA files Fitxers NMEA - + ONmove files Fitxer ONmove - + OV2 files Fitxers OV2 - + OziExplorer files Fitxers OziExplorer - + SLF files Fitxers SLF - + SML files Fitxers SML - + TCX files Fitxers TCX - + 70mai GPS log files - + + VTK files + + + + TwoNav files Fitxers TwoNav - + GPSDump files Ffitxers d'abocament de GPS - + All files Tots els fitxers @@ -2420,17 +2425,17 @@ Ritme - + kn kn - + mi/h mi/h - + km/h km/h diff --git a/lang/gpxsee_cs.ts b/lang/gpxsee_cs.ts index 67438fe1..f015592e 100644 --- a/lang/gpxsee_cs.ts +++ b/lang/gpxsee_cs.ts @@ -70,117 +70,122 @@ Data - + Supported files Podporované soubory - + CSV files Soubory CSV - + CUP files Soubory CUP - + FIT files Soubory FIT - + GeoJSON files Soubory GeoJSON - + GPI files Soubory GPI - + GPX files Soubory GPX - + IGC files Soubory IGC - + ITN files Soubory ITN - + JPEG images Obrázky JPEG - + KML files Soubory KML - + LOC files Soubory LOC - + NMEA files Soubory NMEA - + OV2 files Soubory OV2 - + OziExplorer files Soubory OziExploreru - + SML files Soubory SML - + TCX files Soubory TCX - + SLF files Soubory SLF - + ONmove files Soubory ONmove - + 70mai GPS log files GPS logy z kamer 70mai - + + VTK files + Soubory VTK + + + TwoNav files Soubory TwoNavu - + GPSDump files Soubory GPSDumpu - + All files Všechny soubory @@ -2382,7 +2387,7 @@ Rychlost - + km/h km/h @@ -2427,12 +2432,12 @@ Tempo - + kn kn - + mi/h mi/h diff --git a/lang/gpxsee_da.ts b/lang/gpxsee_da.ts index 432ef888..4ed9c21b 100644 --- a/lang/gpxsee_da.ts +++ b/lang/gpxsee_da.ts @@ -70,117 +70,122 @@ Data - + Supported files Understøttede filer - + CSV files CSV-filer - + CUP files CUP-filer - + FIT files FIT-filer - + GeoJSON files GeoJSON-filer - + GPI files GPI-filer - + GPX files GPX-filer - + IGC files IGC-filer - + ITN files ITN-filer - + JPEG images JPEG-billeder - + KML files KML-filer - + LOC files LOC-filer - + NMEA files NMEA-filer - + ONmove files ONmove-filer - + OV2 files OV2-filer - + OziExplorer files OziExplorer-filer - + SLF files SLF-filer - + SML files SML-filer - + TCX files TCX-filer - + 70mai GPS log files - + + VTK files + + + + TwoNav files TwoNav-filer - + GPSDump files GPSDump-filer - + All files Alle filer @@ -2420,17 +2425,17 @@ Tempo - + kn knob - + mi/h mil/t - + km/h km/t diff --git a/lang/gpxsee_de.ts b/lang/gpxsee_de.ts index c2afb215..f5daf14d 100644 --- a/lang/gpxsee_de.ts +++ b/lang/gpxsee_de.ts @@ -70,117 +70,122 @@ Data - + Supported files Unterstützte Dateien - + CSV files CSV-Dateien - + CUP files CUP-Dateien - + FIT files FIT-Dateien - + GeoJSON files GeoJSON-Dateien - + GPI files GPI-Dateien - + GPX files GPX-Dateien - + IGC files IGC-Dateien - + ITN files ITN-Dateien - + JPEG images JPEG-Bilder - + KML files KML-Dateien - + LOC files LOC-Dateien - + NMEA files NMEA-Dateien - + OV2 files OV2-Dateien - + OziExplorer files OziExplorer-Dateien - + SML files SML-Dateien - + TCX files TCX-Dateien - + SLF files SLF-Dateien - + ONmove files ONmove-Dateien - + 70mai GPS log files 70mai GPS-Logdateien - + + VTK files + VTK-Dateien + + + TwoNav files TwoNav-Dateien - + GPSDump files GPSDump-Dateien - + All files Alle Dateien @@ -2380,7 +2385,7 @@ Geschwindigkeit - + km/h km/h @@ -2425,12 +2430,12 @@ Tempo - + kn kn - + mi/h mi/h diff --git a/lang/gpxsee_eo.ts b/lang/gpxsee_eo.ts index d8b7675d..97a8e28e 100644 --- a/lang/gpxsee_eo.ts +++ b/lang/gpxsee_eo.ts @@ -70,117 +70,122 @@ Data - + Supported files Subtenataj dosieroj - + CSV files CSV-dosieroj - + CUP files CUP-dosieroj - + FIT files FIT-dosieroj - + GeoJSON files GeoJSON-dosieroj - + GPI files GPI-dosieroj - + GPX files GPX-dosieroj - + IGC files IGC-dosieroj - + ITN files ITN-dosieroj - + JPEG images JPEG-bildoj - + KML files KML-dosieroj - + LOC files LOC-dosieroj - + NMEA files NMEA-dosieroj - + ONmove files ONmove-dosieroj - + OV2 files OV2-dosieroj - + OziExplorer files OziExplorer-dosieroj - + SLF files SLF-dosieroj - + SML files SML-dosieroj - + TCX files TCX-dosieroj - + 70mai GPS log files - + + VTK files + VTK dosieroj + + + TwoNav files TwoNav-dosieroj - + GPSDump files GPSDump-dosieroj - + All files Ĉiuj dosieroj @@ -2420,17 +2425,17 @@ Ritmo - + kn kn - + mi/h mi/h - + km/h km/h diff --git a/lang/gpxsee_es.ts b/lang/gpxsee_es.ts index 2e942294..02acac46 100644 --- a/lang/gpxsee_es.ts +++ b/lang/gpxsee_es.ts @@ -70,117 +70,122 @@ Data - + Supported files Formatos admitidos - + CSV files Archivos CSV - + CUP files Archivos CUP - + FIT files Archivos FIT - + GeoJSON files Archivos GeoJSON - + GPI files Archivos GPI - + GPX files Archivos GPX - + IGC files Archivos IGC - + ITN files Archivos ITN - + JPEG images Imágenes JPEG - + KML files Archivos KML - + LOC files Archivos LOC - + NMEA files Archivos NMEA - + ONmove files Archivos ONmove - + OV2 files Archivos OV2 - + OziExplorer files Archivos OziExplorer - + SLF files Archivos SLF - + SML files Archivos SML - + TCX files Archivos TCX - + 70mai GPS log files - + + VTK files + + + + TwoNav files Archivos TwoNav - + GPSDump files Archivos GPSDump - + All files Todos los archivos @@ -2420,17 +2425,17 @@ Ritmo - + kn kn - + mi/h mi/h - + km/h km/h diff --git a/lang/gpxsee_fi.ts b/lang/gpxsee_fi.ts index 14dc837f..900536af 100644 --- a/lang/gpxsee_fi.ts +++ b/lang/gpxsee_fi.ts @@ -70,117 +70,122 @@ Data - + Supported files Tuetut tiedostot - + CSV files CSV-tiedostot - + CUP files CUP-tiedostot - + FIT files FIT-tiedostot - + GeoJSON files GeoJSON-tiedostot - + GPI files GPI-tiedostot - + GPX files GPX-tiedostot - + IGC files IGC-tiedostot - + ITN files ITN-tiedostot - + JPEG images JPEG-kuvat - + KML files KML-tiedostot - + LOC files LOC-tiedostot - + NMEA files NMEA-tiedostot - + OV2 files OV2-tiedostot - + OziExplorer files OziExplorer-tiedostot - + SML files SML-tiedostot - + TCX files TCX-tiedostot - + SLF files SLF-tiedostot - + ONmove files ONmove-tiedostot - + 70mai GPS log files - + 70mai GPS -lokitiedostot - + + VTK files + VTK-tiedostot + + + TwoNav files TwoNav-tiedostot - + GPSDump files GPSDump-tiedostot - + All files Kaikki tiedostot @@ -2380,7 +2385,7 @@ Vauhti - + km/h km/t @@ -2425,12 +2430,12 @@ Tahti - + kn kn - + mi/h mph diff --git a/lang/gpxsee_fr.ts b/lang/gpxsee_fr.ts index 79c1218b..cce38a87 100644 --- a/lang/gpxsee_fr.ts +++ b/lang/gpxsee_fr.ts @@ -70,117 +70,122 @@ Data - + Supported files Formats pris en charge - + CSV files Données CSV - + CUP files Données CUP - + FIT files Données FIT - + GeoJSON files Données GeoJSON - + GPI files Données GPI - + GPX files Données GPX - + IGC files Données IGC - + ITN files Fichiers ITN - + JPEG images Images JPEG - + KML files Données KML - + LOC files Données LOC - + NMEA files Données NMEA - + OV2 files Fichiers OV2 - + OziExplorer files Données OziExplorer - + SML files Données SML - + TCX files Données TCX - + SLF files Données SLF - + ONmove files Données ONmove - + 70mai GPS log files Fichiers de journalisation GPS 70mai - + + VTK files + Fichiers VTK + + + TwoNav files Données TwoNav - + GPSDump files Fichiers GPSDump - + All files Tous les fichiers @@ -2380,7 +2385,7 @@ Vitesse - + km/h km/h @@ -2425,12 +2430,12 @@ Allure - + kn nd - + mi/h mi/h diff --git a/lang/gpxsee_hu.ts b/lang/gpxsee_hu.ts index f7ab24f8..f472f6a8 100644 --- a/lang/gpxsee_hu.ts +++ b/lang/gpxsee_hu.ts @@ -70,117 +70,122 @@ Data - + Supported files Támogatott fájlok - + CSV files CSV fájlok - + CUP files CUP fájlok - + FIT files FIT fájlok - + GeoJSON files GeoJSON fájlok - + GPI files GPI fájlok - + GPX files GPX fájlok - + IGC files IGC fájlok - + ITN files ITN fájlok - + JPEG images JPEG képek - + KML files KML fájlok - + LOC files LOC fájlok - + NMEA files NMEA fájlok - + ONmove files ONmove fájlok - + OV2 files OV2 fájlok - + OziExplorer files OziExplorer fájlok - + SLF files SLF fájlok - + SML files SML fájlok - + TCX files TCX fájlok - + 70mai GPS log files 70mai GPS naplófájlok - + + VTK files + VTK fájlok + + + TwoNav files TwoNav fájlok - + GPSDump files GPSDump fájlok - + All files Minden fájl @@ -2418,17 +2423,17 @@ Iram - + kn csomó - + mi/h mph - + km/h km/h diff --git a/lang/gpxsee_it.ts b/lang/gpxsee_it.ts index 27e79c96..6a47f724 100644 --- a/lang/gpxsee_it.ts +++ b/lang/gpxsee_it.ts @@ -70,117 +70,122 @@ Data - + Supported files File supportati - + CSV files File CSV - + CUP files File CUP - + FIT files File FIT - + GeoJSON files File GeoJSON - + GPI files File GPI - + GPX files File GPX - + IGC files File IGC - + ITN files File ITN - + JPEG images File JPEG - + KML files File KML - + LOC files File LOC - + NMEA files File NMEA - + ONmove files File ONmove - + OV2 files File OV2 - + OziExplorer files File OziExplorer - + SLF files File SLF - + SML files File SML - + TCX files File TCX - + 70mai GPS log files - + + VTK files + + + + TwoNav files File TwoNav - + GPSDump files - + All files Tutti i file @@ -2420,17 +2425,17 @@ Ritmo - + kn kn - + mi/h mi/h - + km/h km/h diff --git a/lang/gpxsee_ko.ts b/lang/gpxsee_ko.ts index 874a203c..1b1d60c6 100644 --- a/lang/gpxsee_ko.ts +++ b/lang/gpxsee_ko.ts @@ -70,117 +70,122 @@ Data - + Supported files 지원되는 파일 - + CSV files CSV 파일 - + CUP files CUP 파일 - + FIT files FIT 파일 - + GeoJSON files GeoJSON 파일 - + GPI files GPI 파일 - + GPX files GPX 파일 - + IGC files IGC 파일 - + ITN files ITN 파일 - + JPEG images JPEG 이미지 - + KML files KML 파일 - + LOC files LOC 파일 - + NMEA files NMEA 파일 - + ONmove files ONmove 파일 - + OV2 files OV2 파일 - + OziExplorer files OziExplorer 파일 - + SLF files SLF 파일 - + SML files SML 파일 - + TCX files TCX 파일 - + 70mai GPS log files - + + VTK files + + + + TwoNav files TwoNav 파일 - + GPSDump files GPSDump 파일 - + All files 모든 파일 @@ -2418,17 +2423,17 @@ 속도 - + kn kn - + mi/h mi/h - + km/h km/h diff --git a/lang/gpxsee_nb.ts b/lang/gpxsee_nb.ts index 748cfe9b..ba6432a1 100644 --- a/lang/gpxsee_nb.ts +++ b/lang/gpxsee_nb.ts @@ -70,117 +70,122 @@ Data - + Supported files Støttede filer - + CSV files CSV-filer - + CUP files CUP-filer - + FIT files FIT-filer - + GeoJSON files GeoJSON-filer - + GPI files GPI-filer - + GPX files GPX-filer - + IGC files IGC-filer - + ITN files ITN-filer - + JPEG images JPEG-bilder - + KML files KML-filer - + LOC files LOC-filer - + NMEA files NMEA-filer - + ONmove files ONmove-filer - + OV2 files OV2-filer - + OziExplorer files OziExplorer-filer - + SLF files SLF-filer - + SML files SML-filer - + TCX files TCX-filer - + 70mai GPS log files - + + VTK files + + + + TwoNav files TwoNav-filer - + GPSDump files GPSDump-filer - + All files Alle filer @@ -2420,17 +2425,17 @@ Tempo - + kn kn - + mi/h mi/h - + km/h km/t diff --git a/lang/gpxsee_pl.ts b/lang/gpxsee_pl.ts index fb878e91..ae47b95a 100644 --- a/lang/gpxsee_pl.ts +++ b/lang/gpxsee_pl.ts @@ -70,117 +70,122 @@ Data - + Supported files Obsługiwane pliki - + CSV files Pliki CSV - + CUP files Pliki CUP - + FIT files Pliki FIT - + GeoJSON files Pliki GeoJSON - + GPI files Pliki GPI - + GPX files Pliki GPX - + IGC files Pliki IGC - + ITN files Pliki ITN - + JPEG images Pliki JPEG - + KML files Pliki KML - + LOC files Pliki LOC - + NMEA files Pliki NMEA - + OV2 files Pliki OV2 - + OziExplorer files Pliki OziExplorer - + SML files Pliki SML - + TCX files Pliki TCX - + SLF files Pliki SLF - + ONmove files - + 70mai GPS log files - + + VTK files + + + + TwoNav files - + GPSDump files - + All files Wszystkie pliki @@ -2382,7 +2387,7 @@ Prędkość - + km/h km/h @@ -2427,12 +2432,12 @@ Tempo - + kn kn - + mi/h mi/h diff --git a/lang/gpxsee_pt_BR.ts b/lang/gpxsee_pt_BR.ts index 9eb38516..38322adf 100644 --- a/lang/gpxsee_pt_BR.ts +++ b/lang/gpxsee_pt_BR.ts @@ -70,117 +70,122 @@ Data - + Supported files Formatos suportados - + CSV files Arquivos CSV - + CUP files Arquivos CUP - + FIT files Arquivos FIT - + GeoJSON files Arquivos GeoJSON - + GPI files Arquivos GPI - + GPX files Arquivos GPX - + IGC files Arquivos IGC - + ITN files - + JPEG images Imagens JPEG - + KML files Arquivos KML - + LOC files Arquivos LOC - + NMEA files Arquivos NMEA - + ONmove files - + OV2 files - + OziExplorer files Arquivos OziExplorer - + SLF files Arquivos SLF - + SML files Arquivos SML - + TCX files Arquivos TCX - + 70mai GPS log files - + + VTK files + + + + TwoNav files - + GPSDump files - + All files Todos os arquivos @@ -2420,17 +2425,17 @@ Ritmo - + kn kn - + mi/h mi/h - + km/h km/h diff --git a/lang/gpxsee_ru.ts b/lang/gpxsee_ru.ts index 795ec15c..ea1a0192 100644 --- a/lang/gpxsee_ru.ts +++ b/lang/gpxsee_ru.ts @@ -70,117 +70,122 @@ Data - + Supported files Все поддерживаемые файлы - + CSV files CSV файлы - + CUP files CUP файлы - + FIT files FIT файлы - + GeoJSON files GeoJSON файлы - + GPI files GPI файлы - + GPX files GPX файлы - + IGC files IGC файлы - + ITN files Файлы ITN - + JPEG images JPEG изображения - + KML files KML файлы - + LOC files LOC файлы - + NMEA files NMEA файлы - + OV2 files OV2 файлы - + OziExplorer files OziExplorer файлы - + SML files SML файлы - + TCX files TCX файлы - + SLF files SLF файлы - + ONmove files ONmove файлы - + 70mai GPS log files - + 70mai GPS файлы - + + VTK files + VTK файлы + + + TwoNav files TwoNav файлы - + GPSDump files GPSDump файлы - + All files Все файлы @@ -832,7 +837,7 @@ Error loading geo URI: - + Ошибка загрузки гео URI: @@ -2382,7 +2387,7 @@ Скорость - + km/h км/ч @@ -2427,12 +2432,12 @@ Темп - + kn уз - + mi/h мл/ч diff --git a/lang/gpxsee_sv.ts b/lang/gpxsee_sv.ts index ef726069..e7b86f2f 100644 --- a/lang/gpxsee_sv.ts +++ b/lang/gpxsee_sv.ts @@ -70,117 +70,122 @@ Data - + Supported files Filer som stöds - + CSV files CSV-filer - + CUP files CUP-filer - + FIT files FIT-filer - + GeoJSON files GeoJSON-filer - + GPI files GPI-filer - + GPX files GPX-filer - + IGC files IGC-filer - + ITN files ITN-filer - + JPEG images JPEG-bilder - + KML files KML-filer - + LOC files LOC-filer - + NMEA files NMEA-filer - + OV2 files OV2-filer - + OziExplorer files OziExplorer-filer - + SML files SML-filer - + TCX files TCX-filer - + SLF files SLF-filer - + ONmove files ONmove-filer - + 70mai GPS log files 70mai GPS-loggfiler - + + VTK files + VTK-filer + + + TwoNav files TwoNav-filer - + GPSDump files GPSDump-filer - + All files Alla filer @@ -2380,7 +2385,7 @@ Hastighet - + km/h km/h @@ -2425,12 +2430,12 @@ Tempo - + kn knop - + mi/h mi/h diff --git a/lang/gpxsee_tr.ts b/lang/gpxsee_tr.ts index be0e80ca..ce87c00a 100644 --- a/lang/gpxsee_tr.ts +++ b/lang/gpxsee_tr.ts @@ -70,117 +70,122 @@ Data - + Supported files Desteklenen dosyalar - + CSV files CSV dosyaları - + CUP files CUP dosyaları - + FIT files FIT dosyaları - + GeoJSON files GeoJSON dosyaları - + GPI files GPI dosyaları - + GPX files GPX dosyaları - + IGC files IGC dosyaları - + ITN files ITN dosyaları - + JPEG images JPEG görüntüleri - + KML files KML dosyaları - + LOC files LOC dosyaları - + NMEA files NMEA dosyaları - + ONmove files ONmove dosyaları - + OV2 files OV2 dostaları - + OziExplorer files OziExplorer dosyaları - + SLF files SLF dosyaları - + SML files SML dosyaları - + TCX files TCX dosyaları - + 70mai GPS log files 70mai GPS kayıt dosyaları - + + VTK files + + + + TwoNav files TwoNav dosyaları - + GPSDump files GPSDump dosyaları - + All files Tüm dosyalar @@ -2418,17 +2423,17 @@ Hız - + kn kn - + mi/h mi/sa - + km/h km/sa diff --git a/lang/gpxsee_uk.ts b/lang/gpxsee_uk.ts index 2219d8de..073bb680 100644 --- a/lang/gpxsee_uk.ts +++ b/lang/gpxsee_uk.ts @@ -70,117 +70,122 @@ Data - + Supported files Всі підтримувані формати - + CSV files CSV файли - + CUP files CUP файли - + FIT files FIT файли - + GeoJSON files GeoJSON файли - + GPI files GPI файли - + GPX files GPX файли - + IGC files IGC файли - + ITN files ITN файли - + JPEG images JPEG зображення - + KML files KML файли - + LOC files LOC файли - + NMEA files NMEA файли - + ONmove files ONmove файли - + OV2 files OV2 файли - + OziExplorer files OziExplorer файли - + SLF files SLF файли - + SML files SML файли - + TCX files TCX файли - + 70mai GPS log files - + 70mai файли журналу GPS - + + VTK files + Файли VTK + + + TwoNav files TwoNav файли - + GPSDump files GPSDump файли - + All files Всі файли @@ -768,7 +773,7 @@ Error loading geo URI: - + Помилка завантаження geo URI: @@ -2422,17 +2427,17 @@ Темп - + kn вуз - + mi/h миль/год - + km/h км/год diff --git a/lang/gpxsee_zh_CN.ts b/lang/gpxsee_zh_CN.ts index a7130535..0abc5445 100644 --- a/lang/gpxsee_zh_CN.ts +++ b/lang/gpxsee_zh_CN.ts @@ -70,117 +70,122 @@ Data - + Supported files 支持的文件 - + CSV files CSV 文件 - + CUP files CUP 文件 - + FIT files FIT 文件 - + GeoJSON files GeoJSON 文件 - + GPI files GPI 文件 - + GPX files GPX 文件 - + IGC files IGC 文件 - + ITN files ITN 文件 - + JPEG images JPEG 图片 - + KML files KML 文件 - + LOC files LOC 文件 - + NMEA files NMEA 文件 - + ONmove files ONmove 文件 - + OV2 files OV2 文件 - + OziExplorer files OziExplorer 文件 - + SLF files SLF 文件 - + SML files SML 文件 - + TCX files TCX 文件 - + 70mai GPS log files - + + VTK files + + + + TwoNav files TwoNav 文件 - + GPSDump files GPSDump 文件 - + All files 所有文件 @@ -2418,17 +2423,17 @@ 配速 - + kn kn - + mi/h mi/h - + km/h km/h diff --git a/pkg/linux/gpxsee.appdata.xml b/pkg/linux/gpxsee.appdata.xml index 07c7339f..f18efd48 100644 --- a/pkg/linux/gpxsee.appdata.xml +++ b/pkg/linux/gpxsee.appdata.xml @@ -15,8 +15,8 @@
  • Opens GPX, TCX, FIT, KML, IGC, NMEA, SIGMA SLF, Suunto SML, LOC, OziExplorer (PLT, WPT, RTE), GeoJSON, SeeYou CUP, Garmin GPI & CSV, TomTom OV2 & ITN, ONmove OMD/GHP, - TwoNav (TRK, RTE, WPT), GPSDump WPT, 70mai GPS logs and - geotagged JPEG files.
  • + TwoNav (TRK, RTE, WPT), GPSDump WPT, Velocitek VTK, + 70mai GPS logs and geotagged JPEG files.
  • Opens geo URIs (RFC 5870).
  • User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS, QuadTiles).
  • @@ -114,6 +114,7 @@ application/vnd.gpsdump.wpt application/vnd.gpstuner.gmi application/vnd.70mai.txt + application/vnd.velocitek.vtk x-scheme-handler/geo diff --git a/pkg/linux/gpxsee.desktop b/pkg/linux/gpxsee.desktop index b6bba86b..bf037bc3 100644 --- a/pkg/linux/gpxsee.desktop +++ b/pkg/linux/gpxsee.desktop @@ -16,4 +16,4 @@ Icon=gpxsee Terminal=false Type=Application Categories=Graphics;Viewer;Education;Geography;Maps;Sports;Qt -MimeType=x-scheme-handler/geo;application/gpx+xml;application/vnd.garmin.tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;application/vnd.oziexplorer.plt;application/vnd.oziexplorer.rte;application/vnd.oziexplorer.wpt;application/vnd.groundspeak.loc+xml;application/vnd.sigma.slf+xml;application/geo+json;application/vnd.naviter.seeyou.cup;application/vnd.garmin.gpi;application/vnd.suunto.sml+xml;image/jpeg;text/csv;application/vnd.garmin.img;application/vnd.garmin.jnx;application/vnd.garmin.gmap+xml;image/vnd.maptech.kap;application/vnd.oziexplorer.map;application/vnd.mapbox.mbtiles;application/vnd.twonav.rmap;application/vnd.trekbuddy.tba;application/vnd.gpxsee.map+xml;application/x-tar;image/tiff;application/vnd.google-earth.kmz;application/vnd.alpinequest.aqm;application/vnd.cgtk.gemf;application/vnd.rmaps.sqlite;application/vnd.osmdroid.sqlite;application/vnd.mapsforge.map;application/vnd.tomtom.ov2;application/vnd.tomtom.itn;application/vnd.esri.wld;application/vnd.onmove.omd;application/vnd.onmove.ghp;application/vnd.memory-map.qct;application/vnd.twonav.trk;application/vnd.twonav.rte;application/vnd.twonav.wpt;application/vnd.orux.map+xml;application/vnd.iho.s57-data;application/vnd.iho.s57-catalogue;application/vnd.gpsdump.wpt;application/vnd.gpstuner.gmi;application/vnd.70mai.txt +MimeType=x-scheme-handler/geo;application/gpx+xml;application/vnd.garmin.tcx+xml;application/vnd.ant.fit;application/vnd.google-earth.kml+xml;application/vnd.fai.igc;application/vnd.nmea.nmea;application/vnd.oziexplorer.plt;application/vnd.oziexplorer.rte;application/vnd.oziexplorer.wpt;application/vnd.groundspeak.loc+xml;application/vnd.sigma.slf+xml;application/geo+json;application/vnd.naviter.seeyou.cup;application/vnd.garmin.gpi;application/vnd.suunto.sml+xml;image/jpeg;text/csv;application/vnd.garmin.img;application/vnd.garmin.jnx;application/vnd.garmin.gmap+xml;image/vnd.maptech.kap;application/vnd.oziexplorer.map;application/vnd.mapbox.mbtiles;application/vnd.twonav.rmap;application/vnd.trekbuddy.tba;application/vnd.gpxsee.map+xml;application/x-tar;image/tiff;application/vnd.google-earth.kmz;application/vnd.alpinequest.aqm;application/vnd.cgtk.gemf;application/vnd.rmaps.sqlite;application/vnd.osmdroid.sqlite;application/vnd.mapsforge.map;application/vnd.tomtom.ov2;application/vnd.tomtom.itn;application/vnd.esri.wld;application/vnd.onmove.omd;application/vnd.onmove.ghp;application/vnd.memory-map.qct;application/vnd.twonav.trk;application/vnd.twonav.rte;application/vnd.twonav.wpt;application/vnd.orux.map+xml;application/vnd.iho.s57-data;application/vnd.iho.s57-catalogue;application/vnd.gpsdump.wpt;application/vnd.gpstuner.gmi;application/vnd.70mai.txt;application/vnd.velocitek.vtk diff --git a/pkg/linux/gpxsee.xml b/pkg/linux/gpxsee.xml index 9286a2ec..fe535d8d 100644 --- a/pkg/linux/gpxsee.xml +++ b/pkg/linux/gpxsee.xml @@ -198,6 +198,13 @@ + + Velocitek VTK File + + + + + diff --git a/pkg/mac/Info.plist b/pkg/mac/Info.plist index 2f4c005a..a980c74e 100644 --- a/pkg/mac/Info.plist +++ b/pkg/mac/Info.plist @@ -750,6 +750,22 @@ CFBundleTypeRole Viewer + + CFBundleTypeExtensions + + vtk + + CFBundleTypeMIMETypes + + application/vnd.velocitek.vtk + + CFBundleTypeIconFile + icons/vtk.icns + CFBundleTypeName + Velocitek VTK File + CFBundleTypeRole + Viewer + CFBundleURLTypes @@ -1697,6 +1713,8 @@ https://iho.int/uploads/user/pubs/standards/s-57/31Main.pdf UTTypeDescription IHO S-57 Electronic Navigation Chart + UTTypeIconFile + icons/000.icns UTTypeConformsTo public.data @@ -1718,6 +1736,8 @@ https://iho.int/uploads/user/pubs/standards/s-57/20ApB1.pdf UTTypeDescription IHO S-57 Electronic Navigation Catalogue + UTTypeIconFile + icons/031.icns UTTypeConformsTo public.data @@ -1753,6 +1773,29 @@ application/vnd.70mai.txt + + UTTypeIdentifier + com.velocitek.vtk + UTTypeReferenceURL + https://github.com/velocitek/vtk_protocol + UTTypeDescription + Velocitek VTK File + UTTypeIconFile + icons/vtk.icns + UTTypeConformsTo + + public.data + + UTTypeTagSpecification + + public.filename-extension + + vtk + + public.mime-type + application/vnd.velocitek.vtk + + UTExportedTypeDeclarations diff --git a/pkg/windows/gpxsee64.nsi b/pkg/windows/gpxsee64.nsi index e2ab96d4..57e2b3d9 100644 --- a/pkg/windows/gpxsee64.nsi +++ b/pkg/windows/gpxsee64.nsi @@ -49,7 +49,7 @@ Unicode true ; The name of the installer Name "GPXSee" ; Program version -!define VERSION "13.37" +!define VERSION "13.38" ; The file to write OutFile "GPXSee-${VERSION}_x64.exe" @@ -204,13 +204,14 @@ Section "GPXSee" SEC_APP !insertmacro FILE_ASSOCIATION_ADD "gemf" "GEMF Map File" 26 !insertmacro FILE_ASSOCIATION_ADD "000" "IHO S-57 Electronic Navigation Chart" 27 !insertmacro FILE_ASSOCIATION_ADD "031" "IHO S-57 Electronic Navigation Catalogue" 28 - !insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 29 - !insertmacro FILE_ASSOCIATION_ADD "kmz" "KML geographic compressed data" 29 - !insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 30 - !insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 31 - !insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 Data" 32 - !insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track File" 33 - !insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 34 + !insertmacro FILE_ASSOCIATION_ADD "vtk" "Velocitek VTK File" 29 + !insertmacro FILE_ASSOCIATION_ADD "kml" "Keyhole Markup Language" 30 + !insertmacro FILE_ASSOCIATION_ADD "kmz" "KML geographic compressed data" 30 + !insertmacro FILE_ASSOCIATION_ADD "fit" "Flexible and Interoperable Data Transfer" 31 + !insertmacro FILE_ASSOCIATION_ADD "igc" "Flight Recorder Data Format" 32 + !insertmacro FILE_ASSOCIATION_ADD "nmea" "NMEA 0183 Data" 33 + !insertmacro FILE_ASSOCIATION_ADD "plt" "OziExplorer Track File" 34 + !insertmacro FILE_ASSOCIATION_ADD "rte" "OziExplorer Route File" 35 !insertmacro URI_ASSOCIATION_ADD "geo" @@ -266,6 +267,7 @@ Section "GPXSee" SEC_APP WriteRegStr HKCR ".000\OpenWithList" "GPXSee.exe" "" WriteRegStr HKCR ".031\OpenWithList" "GPXSee.exe" "" WriteRegStr HKCR ".txt\OpenWithList" "GPXSee.exe" "" + WriteRegStr HKCR ".vtk\OpenWithList" "GPXSee.exe" "" System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' @@ -440,6 +442,7 @@ Section "Uninstall" !insertmacro FILE_ASSOCIATION_REMOVE "gemf" !insertmacro FILE_ASSOCIATION_REMOVE "000" !insertmacro FILE_ASSOCIATION_REMOVE "031" + !insertmacro FILE_ASSOCIATION_REMOVE "vtk" !insertmacro URI_ASSOCIATION_REMOVE "geo" @@ -494,6 +497,7 @@ Section "Uninstall" DeleteRegValue HKCR ".000\OpenWithList" "GPXSee.exe" DeleteRegValue HKCR ".031\OpenWithList" "GPXSee.exe" DeleteRegValue HKCR ".txt\OpenWithList" "GPXSee.exe" + DeleteRegValue HKCR ".vtk\OpenWithList" "GPXSee.exe" DeleteRegKey HKCR "Applications\GPXSee.exe" System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)' diff --git a/src/GUI/speedgraph.cpp b/src/GUI/speedgraph.cpp index 8d26073c..d9f457f7 100644 --- a/src/GUI/speedgraph.cpp +++ b/src/GUI/speedgraph.cpp @@ -64,6 +64,7 @@ GraphItem *SpeedGraph::loadGraph(const Graph &graph, const Track &track, if (primary) { _avg.append(QPointF(track.distance(), gi->avg())); _mavg.append(QPointF(track.distance(), gi->mavg())); + _max.append(QPointF(track.distance(), gi->max())); } return gi; @@ -117,6 +118,16 @@ qreal SpeedGraph::avg() const return (sum / w); } +qreal SpeedGraph::max() const +{ + qreal mv = 0; + + for (int i = 0; i < _max.size(); i++) + mv = qMax(mv, _max.at(i).y()); + + return mv; +} + void SpeedGraph::clear() { qDeleteAll(_tracks); @@ -124,6 +135,7 @@ void SpeedGraph::clear() _avg.clear(); _mavg.clear(); + _max.clear(); GraphTab::clear(); } diff --git a/src/GUI/speedgraph.h b/src/GUI/speedgraph.h index f44b7b4a..febf16be 100644 --- a/src/GUI/speedgraph.h +++ b/src/GUI/speedgraph.h @@ -26,12 +26,13 @@ private: GraphItem *loadGraph(const Graph &graph, const Track &track, const QColor &color, bool primary); qreal avg() const; - qreal max() const {return bounds().bottom();} + qreal max() const; void setYUnits(); void setInfo(); QVector _avg; QVector _mavg; + QVector _max; Units _units; TimeType _timeType; diff --git a/src/data/data.cpp b/src/data/data.cpp index 6ed63882..ecba0159 100644 --- a/src/data/data.cpp +++ b/src/data/data.cpp @@ -24,6 +24,7 @@ #include "twonavparser.h" #include "gpsdumpparser.h" #include "txtparser.h" +#include "vtkparser.h" #include "data.h" @@ -51,6 +52,7 @@ static GHPParser ghp; static TwoNavParser twonav; static GPSDumpParser gpsdump; static TXTParser txt; +static VTKParser vtk; static QMultiMap parsers() { @@ -85,6 +87,7 @@ static QMultiMap parsers() map.insert("wpt", &twonav); map.insert("wpt", &gpsdump); map.insert("txt", &txt); + map.insert("vtk", &vtk); return map; } @@ -245,6 +248,7 @@ QString Data::formats() + qApp->translate("Data", "SML files") + " (*.sml);;" + qApp->translate("Data", "TCX files") + " (*.tcx);;" + qApp->translate("Data", "70mai GPS log files") + " (*.txt);;" + + qApp->translate("Data", "VTK files") + " (*.vtk);;" + qApp->translate("Data", "TwoNav files") + " (*.rte *.trk *.wpt);;" + qApp->translate("Data", "GPSDump files") + " (*.wpt);;" + qApp->translate("Data", "All files") + " (*)"; diff --git a/src/data/fitparser.cpp b/src/data/fitparser.cpp index e22bce5f..480b9d3e 100644 --- a/src/data/fitparser.cpp +++ b/src/data/fitparser.cpp @@ -467,8 +467,7 @@ bool FITParser::parseHeader(CTX &ctx) } bool FITParser::parse(QFile *file, QList &tracks, - QList &routes, - QList &polygons, QVector &waypoints) + QList &routes, QList &polygons, QVector &waypoints) { Q_UNUSED(routes); Q_UNUSED(polygons); diff --git a/src/data/tcxparser.h b/src/data/tcxparser.h index 685668b3..ff27aca9 100644 --- a/src/data/tcxparser.h +++ b/src/data/tcxparser.h @@ -4,7 +4,6 @@ #include #include "parser.h" - class TCXParser : public Parser { public: diff --git a/src/data/vtkparser.cpp b/src/data/vtkparser.cpp new file mode 100644 index 00000000..bb32a551 --- /dev/null +++ b/src/data/vtkparser.cpp @@ -0,0 +1,217 @@ +#include +#include +#include "vtkparser.h" + +#define TYPE(tag) (tag & 0x07) +#define FIELD(tag) (tag >> 3) + +#define VARINT 0 +#define I64 1 +#define LEN 2 +#define I32 5 + +struct CTX +{ + CTX(const QByteArray &ba) + : bp(ba.constData()), be(bp + ba.size()), tag(0) {} + + const char *bp; + const char *be; + quint32 tag; +}; + +static inline qint32 zigzag32decode(quint32 value) +{ + return static_cast((value >> 1u) ^ static_cast( + -static_cast(value & 1u))); +} + +template +static bool varint(CTX &ctx, T &val) +{ + unsigned int shift = 0; + val = 0; + + while (ctx.bp < ctx.be) { + val |= ((quint8)*ctx.bp & 0x7F) << shift; + shift += 7; + if (!((quint8)*ctx.bp++ & 0x80)) + return true; + } + + return false; +} + +static bool length(CTX &ctx, qint32 &val) +{ + if (TYPE(ctx.tag) != LEN) + return false; + + if (!varint(ctx, val)) + return false; + + return (val >= 0); +} + +static bool skip(CTX &ctx) +{ + qint32 len = 0; + + switch (TYPE(ctx.tag)) { + case VARINT: + return varint(ctx, len); + case I64: + len = 8; + break; + case LEN: + if (!varint(ctx, len) || len < 0) + return false; + break; + case I32: + len = 4; + break; + default: + return false; + } + + if (ctx.bp + len > ctx.be) + return false; + ctx.bp += len; + + return true; +} + +static bool trackpoint(CTX &ctx, Trackpoint &t) +{ + qint32 len, lon = 0xFFFFFFF, lat = 0xFFFFFFF; + quint32 val, seconds = 0, centiSeconds = 0, speed = 0; + + if (!length(ctx, len)) + return false; + + const char *ee = ctx.bp + len; + if (ee > ctx.be) + return false; + + while (ctx.bp < ee) { + if (!varint(ctx, ctx.tag)) + return false; + + switch (FIELD(ctx.tag)) { + case 1: + if (TYPE(ctx.tag) != VARINT) + return false; + if (!varint(ctx, seconds)) + return false; + break; + case 2: + if (TYPE(ctx.tag) != VARINT) + return false; + if (!varint(ctx, centiSeconds)) + return false; + break; + case 3: + if (TYPE(ctx.tag) != VARINT) + return false; + if (!varint(ctx, val)) + return false; + lat = zigzag32decode(val); + break; + case 4: + if (TYPE(ctx.tag) != VARINT) + return false; + if (!varint(ctx, val)) + return false; + lon = zigzag32decode(val); + break; + case 5: + if (TYPE(ctx.tag) != VARINT) + return false; + if (!varint(ctx, speed)) + return false; + break; + default: + if (!skip(ctx)) + return false; + } + } + + t.setCoordinates(Coordinates(lon / 1e7, lat / 1e7)); + t.setTimestamp(QDateTime::fromMSecsSinceEpoch( + ((qint64)seconds * 1000) + ((qint64)centiSeconds * 10), + QTimeZone::utc())); + t.setSpeed(speed * 0.051444); + + return (ctx.bp == ee); +} + +static bool record(CTX &ctx, Trackpoint &t) +{ + while (ctx.bp < ctx.be) { + if (!varint(ctx, ctx.tag)) + return false; + + switch (FIELD(ctx.tag)) { + case 1: + if (!trackpoint(ctx, t)) + return false; + break; + default: + if (!skip(ctx)) + return false; + } + } + + return (ctx.bp == ctx.be); +} + +bool VTKParser::parse(QFile *file, QList &tracks, + QList &routes, QList &polygons, QVector &waypoints) +{ + Q_UNUSED(routes); + Q_UNUSED(polygons); + Q_UNUSED(waypoints); + qint64 len; + quint16 recordLen; + QByteArray ba; + SegmentData segment; + Trackpoint t; + + _errorString = ""; + + while (true) { + if ((len = file->read((char*)&recordLen, sizeof(recordLen))) + != sizeof(recordLen)) { + if (!len) + break; + else { + _errorString = "Error reading VTK record size"; + return false; + } + } + + recordLen = qFromLittleEndian(recordLen); + ba.resize(recordLen); + if (file->read(ba.data(), ba.size()) != ba.size()) { + _errorString = "Error reading VTK record"; + return false; + } + + CTX ctx(ba); + t.setCoordinates(Coordinates()); + if (!record(ctx, t)) { + _errorString = "Invalid VTK record"; + return false; + } else { + if (t.coordinates().isValid()) + segment.append(t); + else if (!t.coordinates().isNull()) { + _errorString = "Invalid VTK record coordinates"; + return false; + } + } + } + + tracks.append(segment); + return true; +} diff --git a/src/data/vtkparser.h b/src/data/vtkparser.h new file mode 100644 index 00000000..81e0cab8 --- /dev/null +++ b/src/data/vtkparser.h @@ -0,0 +1,18 @@ +#ifndef VTKPARSER_H +#define VTKPARSER_H + +#include "parser.h" + +class VTKParser : public Parser +{ +public: + bool parse(QFile *file, QList &tracks, QList &routes, + QList &polygons, QVector &waypoints); + QString errorString() const {return _errorString;} + int errorLine() const {return 0;} + +private: + QString _errorString; +}; + +#endif // VTKPARSER_H diff --git a/src/map/IMG/rgnfile.cpp b/src/map/IMG/rgnfile.cpp index 495ed69f..28f4cb5b 100644 --- a/src/map/IMG/rgnfile.cpp +++ b/src/map/IMG/rgnfile.cpp @@ -133,9 +133,7 @@ bool RGNFile::readBuoyInfo(Handle &hdl, quint8 flags, quint32 size, bool RGNFile::readLightInfo(Handle &hdl, quint8 flags, quint32 size, MapData::Point *point) const { - quint16 flags1; - quint8 flags2; - quint32 unused; + quint32 flags1, flags2, unused; if (!(size >= 3 && readUInt16(hdl, flags1) && readUInt8(hdl, flags2))) return false; diff --git a/src/map/mapsforge/rastertile.cpp b/src/map/mapsforge/rastertile.cpp index fb72e8c4..bfe292a1 100644 --- a/src/map/mapsforge/rastertile.cpp +++ b/src/map/mapsforge/rastertile.cpp @@ -188,7 +188,7 @@ void RasterTile::processLineLabels(const QVector &paths, if (l.ti) { limit = (l.ti->key() == ID_ELE || l.ti->key() == ID_REF || (!l.si && l.ti->shield())); - if (limit && set.contains(*l.lbl)) + if (limit && l.lbl && set.contains(*l.lbl)) continue; } @@ -214,7 +214,7 @@ void RasterTile::processLineLabels(const QVector &paths, color, hColor, rotate); if (item->isValid() && !item->collides(textItems)) { textItems.append(item); - if (limit) + if (limit && l.lbl) set.insert(*l.lbl); } else { delete item; diff --git a/src/map/mapsforge/style.cpp b/src/map/mapsforge/style.cpp index f3803b73..156c153e 100644 --- a/src/map/mapsforge/style.cpp +++ b/src/map/mapsforge/style.cpp @@ -116,13 +116,15 @@ QSet Style::Menu::cats() const } Style::Rule::Filter::Filter(const MapData &data, const QList &keys, - const QList &vals) : _neg(false) + const QList &vals) : _neg(false), _excl(false) { _keys = keyList(data, keys); QList vc(vals); if (vc.removeAll("~")) _neg = true; + if (vc.removeAll("-")) + _excl = true; _vals = valList(vc); } diff --git a/src/map/mapsforge/style.h b/src/map/mapsforge/style.h index a9367dcd..44ff15e0 100644 --- a/src/map/mapsforge/style.h +++ b/src/map/mapsforge/style.h @@ -38,7 +38,7 @@ public: class Filter { public: - Filter() : _neg(false) {} + Filter() : _neg(false), _excl(false) {} Filter(const MapData &data, const QList &keys, const QList &vals); @@ -47,14 +47,15 @@ public: if (_neg) { if (!keyMatches(tags)) return true; - return valueMatches(tags); + return valueMatches(tags) ^ _excl; } else - return (keyMatches(tags) && valueMatches(tags)); + return (keyMatches(tags) && (valueMatches(tags) ^ _excl)); } bool isTautology() const { - return (!_neg && _keys.contains(0u) && _vals.contains(QByteArray())); + return (!_neg && !_excl && _keys.contains(0u) + && _vals.contains(QByteArray())); } private: @@ -86,7 +87,7 @@ public: QList _keys; QList _vals; - bool _neg; + bool _neg, _excl; }; void setType(Type type)