mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-04-20 04:09:11 +02:00
Compare commits
No commits in common. "5d1ba90f09398506433d62765b75b9424cbd93fb" and "f5f27c0212a65ca60b5d10e923274caefea58458" have entirely different histories.
5d1ba90f09
...
f5f27c0212
@ -117,7 +117,6 @@ HEADERS += src/common/config.h \
|
|||||||
src/data/gpsdumpparser.h \
|
src/data/gpsdumpparser.h \
|
||||||
src/data/style.h \
|
src/data/style.h \
|
||||||
src/data/twonavparser.h \
|
src/data/twonavparser.h \
|
||||||
src/data/txtparser.h \
|
|
||||||
src/map/IMG/light.h \
|
src/map/IMG/light.h \
|
||||||
src/map/downloader.h \
|
src/map/downloader.h \
|
||||||
src/map/demloader.h \
|
src/map/demloader.h \
|
||||||
@ -344,7 +343,6 @@ SOURCES += src/main.cpp \
|
|||||||
src/GUI/pngexportdialog.cpp \
|
src/GUI/pngexportdialog.cpp \
|
||||||
src/GUI/projectioncombobox.cpp \
|
src/GUI/projectioncombobox.cpp \
|
||||||
src/GUI/passwordedit.cpp \
|
src/GUI/passwordedit.cpp \
|
||||||
src/data/txtparser.cpp \
|
|
||||||
src/map/downloader.cpp \
|
src/map/downloader.cpp \
|
||||||
src/map/demloader.cpp \
|
src/map/demloader.cpp \
|
||||||
src/map/ENC/atlasdata.cpp \
|
src/map/ENC/atlasdata.cpp \
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -15,8 +15,8 @@
|
|||||||
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SIGMA SLF, Suunto SML, LOC,
|
<li>Opens GPX, TCX, FIT, KML, IGC, NMEA, SIGMA SLF, Suunto SML, LOC,
|
||||||
OziExplorer (PLT, WPT, RTE), GeoJSON, SeeYou CUP,
|
OziExplorer (PLT, WPT, RTE), GeoJSON, SeeYou CUP,
|
||||||
Garmin GPI & CSV, TomTom OV2 & ITN, ONmove OMD/GHP,
|
Garmin GPI & CSV, TomTom OV2 & ITN, ONmove OMD/GHP,
|
||||||
TwoNav (TRK, RTE, WPT), GPSDump WPT, 70mai GPS logs and
|
TwoNav (TRK, RTE, WPT), GPSDump WPT and geotagged JPEG
|
||||||
geotagged JPEG files.</li>
|
files.</li>
|
||||||
<li>Opens geo URIs (RFC 5870).</li>
|
<li>Opens geo URIs (RFC 5870).</li>
|
||||||
<li>User-definable online maps (OpenStreetMap/Google tiles, WMTS,
|
<li>User-definable online maps (OpenStreetMap/Google tiles, WMTS,
|
||||||
WMS, TMS, QuadTiles).</li>
|
WMS, TMS, QuadTiles).</li>
|
||||||
@ -113,7 +113,6 @@
|
|||||||
<mimetype>application/vnd.iho.s57-catalogue</mimetype>
|
<mimetype>application/vnd.iho.s57-catalogue</mimetype>
|
||||||
<mimetype>application/vnd.gpsdump.wpt</mimetype>
|
<mimetype>application/vnd.gpsdump.wpt</mimetype>
|
||||||
<mimetype>application/vnd.gpstuner.gmi</mimetype>
|
<mimetype>application/vnd.gpstuner.gmi</mimetype>
|
||||||
<mimetype>application/vnd.70mai.txt</mimetype>
|
|
||||||
<mimetype>x-scheme-handler/geo</mimetype>
|
<mimetype>x-scheme-handler/geo</mimetype>
|
||||||
</mimetypes>
|
</mimetypes>
|
||||||
</component>
|
</component>
|
||||||
|
@ -16,4 +16,4 @@ Icon=gpxsee
|
|||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=Graphics;Viewer;Education;Geography;Maps;Sports;Qt
|
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
|
||||||
|
@ -188,16 +188,6 @@
|
|||||||
<glob pattern="*.wpt"/>
|
<glob pattern="*.wpt"/>
|
||||||
</mime-type>
|
</mime-type>
|
||||||
|
|
||||||
<mime-type type="application/vnd.70mai.txt">
|
|
||||||
<comment>70mai GPS Log File</comment>
|
|
||||||
<sub-class-of type="text/plain"/>
|
|
||||||
<generic-icon name="text/plain"/>
|
|
||||||
<magic>
|
|
||||||
<match type="string" offset="0" value="$V02"/>
|
|
||||||
</magic>
|
|
||||||
<glob pattern="*.txt"/>
|
|
||||||
</mime-type>
|
|
||||||
|
|
||||||
<!-- Maps -->
|
<!-- Maps -->
|
||||||
|
|
||||||
<mime-type type="application/vnd.garmin.img">
|
<mime-type type="application/vnd.garmin.img">
|
||||||
|
@ -736,20 +736,6 @@
|
|||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Viewer</string>
|
<string>Viewer</string>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
|
||||||
<key>CFBundleTypeExtensions</key>
|
|
||||||
<array>
|
|
||||||
<string>txt</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleTypeMIMETypes</key>
|
|
||||||
<array>
|
|
||||||
<string>application/vnd.70mai.txt</string>
|
|
||||||
</array>
|
|
||||||
<key>CFBundleTypeName</key>
|
|
||||||
<string>70mai GPS Log File</string>
|
|
||||||
<key>CFBundleTypeRole</key>
|
|
||||||
<string>Viewer</string>
|
|
||||||
</dict>
|
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<key>CFBundleURLTypes</key>
|
<key>CFBundleURLTypes</key>
|
||||||
@ -1732,27 +1718,6 @@
|
|||||||
<string>application/vnd.iho.s57-catalogue</string>
|
<string>application/vnd.iho.s57-catalogue</string>
|
||||||
</dict>
|
</dict>
|
||||||
</dict>
|
</dict>
|
||||||
<dict>
|
|
||||||
<key>UTTypeIdentifier</key>
|
|
||||||
<string>com.70mai.txt</string>
|
|
||||||
<key>UTTypeReferenceURL</key>
|
|
||||||
<string>https://forum.mapillary.com/t/using-the-70mai-a810-dashcam-for-mapillary/9130/7?u=boris</string>
|
|
||||||
<key>UTTypeDescription</key>
|
|
||||||
<string>70mai GPS Log File</string>
|
|
||||||
<key>UTTypeConformsTo</key>
|
|
||||||
<array>
|
|
||||||
<string>public.data</string>
|
|
||||||
</array>
|
|
||||||
<key>UTTypeTagSpecification</key>
|
|
||||||
<dict>
|
|
||||||
<key>public.filename-extension</key>
|
|
||||||
<array>
|
|
||||||
<string>txt</string>
|
|
||||||
</array>
|
|
||||||
<key>public.mime-type</key>
|
|
||||||
<string>application/vnd.70mai.txt</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</array>
|
</array>
|
||||||
|
|
||||||
<key>UTExportedTypeDeclarations</key>
|
<key>UTExportedTypeDeclarations</key>
|
||||||
|
@ -265,7 +265,6 @@ Section "GPXSee" SEC_APP
|
|||||||
WriteRegStr HKCR ".gemf\OpenWithList" "GPXSee.exe" ""
|
WriteRegStr HKCR ".gemf\OpenWithList" "GPXSee.exe" ""
|
||||||
WriteRegStr HKCR ".000\OpenWithList" "GPXSee.exe" ""
|
WriteRegStr HKCR ".000\OpenWithList" "GPXSee.exe" ""
|
||||||
WriteRegStr HKCR ".031\OpenWithList" "GPXSee.exe" ""
|
WriteRegStr HKCR ".031\OpenWithList" "GPXSee.exe" ""
|
||||||
WriteRegStr HKCR ".txt\OpenWithList" "GPXSee.exe" ""
|
|
||||||
|
|
||||||
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||||
|
|
||||||
@ -493,7 +492,6 @@ Section "Uninstall"
|
|||||||
DeleteRegValue HKCR ".gemf\OpenWithList" "GPXSee.exe"
|
DeleteRegValue HKCR ".gemf\OpenWithList" "GPXSee.exe"
|
||||||
DeleteRegValue HKCR ".000\OpenWithList" "GPXSee.exe"
|
DeleteRegValue HKCR ".000\OpenWithList" "GPXSee.exe"
|
||||||
DeleteRegValue HKCR ".031\OpenWithList" "GPXSee.exe"
|
DeleteRegValue HKCR ".031\OpenWithList" "GPXSee.exe"
|
||||||
DeleteRegValue HKCR ".txt\OpenWithList" "GPXSee.exe"
|
|
||||||
DeleteRegKey HKCR "Applications\GPXSee.exe"
|
DeleteRegKey HKCR "Applications\GPXSee.exe"
|
||||||
|
|
||||||
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
|
||||||
|
@ -1193,13 +1193,11 @@ void GUI::loadData(const Data &data)
|
|||||||
_time += track.time();
|
_time += track.time();
|
||||||
_movingTime += track.movingTime();
|
_movingTime += track.movingTime();
|
||||||
const QDateTime date = track.date().toTimeZone(_options.timeZone.zone());
|
const QDateTime date = track.date().toTimeZone(_options.timeZone.zone());
|
||||||
if (date.isValid()) {
|
|
||||||
if (_dateRange.first.isNull() || _dateRange.first > date)
|
if (_dateRange.first.isNull() || _dateRange.first > date)
|
||||||
_dateRange.first = date;
|
_dateRange.first = date;
|
||||||
if (_dateRange.second.isNull() || _dateRange.second < date)
|
if (_dateRange.second.isNull() || _dateRange.second < date)
|
||||||
_dateRange.second = date;
|
_dateRange.second = date;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_trackCount += data.tracks().count();
|
_trackCount += data.tracks().count();
|
||||||
|
|
||||||
for (int i = 0; i < data.routes().count(); i++)
|
for (int i = 0; i < data.routes().count(); i++)
|
||||||
|
@ -7,18 +7,15 @@ RFC 4180 parser with the following enchancements:
|
|||||||
- allows LF line ends in addition to CRLF line ends
|
- allows LF line ends in addition to CRLF line ends
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool CSV::readEntry(QByteArrayList &list, int limit)
|
bool CSV::readEntry(QByteArrayList &list)
|
||||||
{
|
{
|
||||||
int state = 0, len = 0;
|
int state = 0;
|
||||||
char c;
|
char c;
|
||||||
QByteArray field;
|
QByteArray field;
|
||||||
|
|
||||||
list.clear();
|
list.clear();
|
||||||
|
|
||||||
while (_device->getChar(&c)) {
|
while (_device->getChar(&c)) {
|
||||||
if (limit && ++len > limit)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case 0:
|
case 0:
|
||||||
if (c == '\r')
|
if (c == '\r')
|
||||||
|
@ -9,7 +9,7 @@ public:
|
|||||||
CSV(QIODevice *device, char delimiter = ',')
|
CSV(QIODevice *device, char delimiter = ',')
|
||||||
: _device(device), _delimiter(delimiter), _line(1) {}
|
: _device(device), _delimiter(delimiter), _line(1) {}
|
||||||
|
|
||||||
bool readEntry(QByteArrayList &list, int limit = 4096);
|
bool readEntry(QByteArrayList &list);
|
||||||
bool atEnd() const {return _device->atEnd();}
|
bool atEnd() const {return _device->atEnd();}
|
||||||
int line() const {return _line;}
|
int line() const {return _line;}
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "onmoveparsers.h"
|
#include "onmoveparsers.h"
|
||||||
#include "twonavparser.h"
|
#include "twonavparser.h"
|
||||||
#include "gpsdumpparser.h"
|
#include "gpsdumpparser.h"
|
||||||
#include "txtparser.h"
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
|
|
||||||
|
|
||||||
@ -50,7 +49,6 @@ static OMDParser omd;
|
|||||||
static GHPParser ghp;
|
static GHPParser ghp;
|
||||||
static TwoNavParser twonav;
|
static TwoNavParser twonav;
|
||||||
static GPSDumpParser gpsdump;
|
static GPSDumpParser gpsdump;
|
||||||
static TXTParser txt;
|
|
||||||
|
|
||||||
static QMultiMap<QString, Parser*> parsers()
|
static QMultiMap<QString, Parser*> parsers()
|
||||||
{
|
{
|
||||||
@ -84,7 +82,6 @@ static QMultiMap<QString, Parser*> parsers()
|
|||||||
map.insert("rte", &twonav);
|
map.insert("rte", &twonav);
|
||||||
map.insert("wpt", &twonav);
|
map.insert("wpt", &twonav);
|
||||||
map.insert("wpt", &gpsdump);
|
map.insert("wpt", &gpsdump);
|
||||||
map.insert("txt", &txt);
|
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@ -244,7 +241,6 @@ QString Data::formats()
|
|||||||
+ qApp->translate("Data", "SLF files") + " (*.slf);;"
|
+ qApp->translate("Data", "SLF files") + " (*.slf);;"
|
||||||
+ qApp->translate("Data", "SML files") + " (*.sml);;"
|
+ qApp->translate("Data", "SML files") + " (*.sml);;"
|
||||||
+ qApp->translate("Data", "TCX files") + " (*.tcx);;"
|
+ qApp->translate("Data", "TCX files") + " (*.tcx);;"
|
||||||
+ qApp->translate("Data", "70mai GPS log files") + " (*.txt);;"
|
|
||||||
+ qApp->translate("Data", "TwoNav files") + " (*.rte *.trk *.wpt);;"
|
+ qApp->translate("Data", "TwoNav files") + " (*.rte *.trk *.wpt);;"
|
||||||
+ qApp->translate("Data", "GPSDump files") + " (*.wpt);;"
|
+ qApp->translate("Data", "GPSDump files") + " (*.wpt);;"
|
||||||
+ qApp->translate("Data", "All files") + " (*)";
|
+ qApp->translate("Data", "All files") + " (*)";
|
||||||
|
@ -1,80 +0,0 @@
|
|||||||
#include <QTimeZone>
|
|
||||||
#include "common/csv.h"
|
|
||||||
#include "txtparser.h"
|
|
||||||
|
|
||||||
static Coordinates coordinates(const QByteArrayList &entry)
|
|
||||||
{
|
|
||||||
bool lonOk, latOk;
|
|
||||||
double lon = entry.at(3).toDouble(&lonOk);
|
|
||||||
double lat = entry.at(2).toDouble(&latOk);
|
|
||||||
|
|
||||||
return (lonOk && latOk) ? Coordinates(lon, lat) : Coordinates();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TXTParser::parse(QFile *file, QList<TrackData> &tracks,
|
|
||||||
QList<RouteData> &routes, QList<Area> &polygons, QVector<Waypoint> &waypoints)
|
|
||||||
{
|
|
||||||
Q_UNUSED(routes);
|
|
||||||
Q_UNUSED(polygons);
|
|
||||||
Q_UNUSED(waypoints);
|
|
||||||
CSV csv(file);
|
|
||||||
QByteArrayList entry;
|
|
||||||
SegmentData *sg = 0;
|
|
||||||
|
|
||||||
_errorLine = 1;
|
|
||||||
_errorString.clear();
|
|
||||||
|
|
||||||
while (!csv.atEnd()) {
|
|
||||||
if (!csv.readEntry(entry)) {
|
|
||||||
_errorString = "CSV parse error";
|
|
||||||
_errorLine = csv.line() - 1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entry.size() == 1) {
|
|
||||||
if (entry.at(0) == "$V02") {
|
|
||||||
tracks.append(TrackData(SegmentData()));
|
|
||||||
sg = &tracks.last().last();
|
|
||||||
} else {
|
|
||||||
_errorString = "Invalid track start marker";
|
|
||||||
_errorLine = csv.line() - 1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else if (entry.size() == 13) {
|
|
||||||
if (!sg) {
|
|
||||||
_errorString = "Missing start marker";
|
|
||||||
_errorLine = csv.line() - 1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (entry.at(1) == "A") {
|
|
||||||
Coordinates c(coordinates(entry));
|
|
||||||
if (!c.isValid()) {
|
|
||||||
_errorString = "Invalid coordinates";
|
|
||||||
_errorLine = csv.line() - 1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Trackpoint tp(c);
|
|
||||||
|
|
||||||
bool ok;
|
|
||||||
qulonglong ts = entry.at(0).toULongLong(&ok);
|
|
||||||
if (!ok) {
|
|
||||||
_errorString = "Invalid timestamp";
|
|
||||||
_errorLine = csv.line() - 1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
tp.setTimestamp(QDateTime::fromSecsSinceEpoch(ts,
|
|
||||||
QTimeZone::utc()));
|
|
||||||
|
|
||||||
uint speed = entry.at(5).toULong(&ok);
|
|
||||||
if (ok)
|
|
||||||
tp.setSpeed(speed * 0.01);
|
|
||||||
|
|
||||||
if (c != Coordinates(0, 0))
|
|
||||||
sg->append(tp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
@ -1,18 +0,0 @@
|
|||||||
#ifndef TXTPARSER_H
|
|
||||||
#define TXTPARSER_H
|
|
||||||
|
|
||||||
#include "parser.h"
|
|
||||||
|
|
||||||
class TXTParser : public Parser
|
|
||||||
{
|
|
||||||
bool parse(QFile *file, QList<TrackData> &tracks, QList<RouteData> &routes,
|
|
||||||
QList<Area> &polygons, QVector<Waypoint> &waypoints);
|
|
||||||
QString errorString() const {return _errorString;}
|
|
||||||
int errorLine() const {return _errorLine;}
|
|
||||||
|
|
||||||
private:
|
|
||||||
QString _errorString;
|
|
||||||
int _errorLine;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // TXTPARSER_H
|
|
Loading…
x
Reference in New Issue
Block a user