mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Properly handle files without elevation data
This commit is contained in:
parent
070eff2115
commit
fa08c0dbea
@ -54,6 +54,7 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasTime() const
|
bool hasTime() const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < size(); i++) {
|
for (int i = 0; i < size(); i++) {
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "dem.h"
|
|
||||||
#include "route.h"
|
#include "route.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
#include "dem.h"
|
|
||||||
#include "track.h"
|
#include "track.h"
|
||||||
|
|
||||||
|
|
||||||
@ -177,7 +176,7 @@ Graph Track::elevation() const
|
|||||||
GraphSegment gs;
|
GraphSegment gs;
|
||||||
|
|
||||||
for (int j = 0; j < sd.size(); j++) {
|
for (int j = 0; j < sd.size(); j++) {
|
||||||
if (seg.outliers.contains(j))
|
if (!sd.at(j).hasElevation() || seg.outliers.contains(j))
|
||||||
continue;
|
continue;
|
||||||
gs.append(GraphPoint(seg.distance.at(j), seg.time.at(j),
|
gs.append(GraphPoint(seg.distance.at(j), seg.time.at(j),
|
||||||
sd.at(j).elevation()));
|
sd.at(j).elevation()));
|
||||||
|
Loading…
Reference in New Issue
Block a user