KML description: max/min elevation will not show if have invalid values (unknow).

This commit is contained in:
Román
2020-04-16 18:53:49 +02:00
parent fa9cb3903c
commit 54b9c4370b
4 changed files with 51 additions and 2 deletions
@@ -313,6 +313,9 @@ abstract class AbstractFileTrackImporter extends DefaultHandler implements Track
*/
protected TrackPoint getTrackPoint() throws SAXException {
TrackPoint trackPoint = createTrackPoint();
if (trackPoint == null) {
throw new SAXException(createErrorMessage("Invalid location detected: " + trackPoint));
}
// Calculate derived attributes from the previous point
if (trackData.lastLocationInCurrentSegment != null && trackData.lastLocationInCurrentSegment.getTime() != 0) {