mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 09:05:14 +01:00
Fixed Garmin CSV reader coordinates order (correct is lon, lat)
This commit is contained in:
parent
09a5f57109
commit
8d1be76043
@ -18,16 +18,16 @@ bool CSVParser::parse(QFile *file, QList<TrackData> &tracks,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal lat = list[0].trimmed().toDouble(&res);
|
qreal lon = list[0].trimmed().toDouble(&res);
|
||||||
if (!res || (lat < -90.0 || lat > 90.0)) {
|
|
||||||
_errorString = "Invalid latitude";
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
qreal lon = list[1].trimmed().toDouble(&res);
|
|
||||||
if (!res || (lon < -180.0 || lon > 180.0)) {
|
if (!res || (lon < -180.0 || lon > 180.0)) {
|
||||||
_errorString = "Invalid longitude";
|
_errorString = "Invalid longitude";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
qreal lat = list[1].trimmed().toDouble(&res);
|
||||||
|
if (!res || (lat < -90.0 || lat > 90.0)) {
|
||||||
|
_errorString = "Invalid latitude";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Waypoint wp(Coordinates(lon, lat));
|
Waypoint wp(Coordinates(lon, lat));
|
||||||
|
|
||||||
QByteArray ba = list[2].trimmed();
|
QByteArray ba = list[2].trimmed();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user