def get_elevation_extremes(self):
        if not self.points:
            return MinimumMaximum(None, None)

        elevations = map(lambda location: location.elevation, self.points)
        elevations = filter(lambda elevation: elevation is not None, elevations)
        elevations = list(elevations)

        if len(elevations) == 0:
            return MinimumMaximum(None, None)

        return MinimumMaximum(min(elevations), max(elevations))
Calculate elevation extremes of track segment
dataset/ETHPy150Open tkrajina/gpxpy/gpxpy/gpx.py/GPXTrackSegment.get_elevation_extremes