def format(self, altitude=None, deg_char='', min_char='m', sec_char='s'):
        latitude = "%s %s" % (
            format.angle(abs(self.latitude), deg_char, min_char, sec_char),
            self.latitude >= 0 and 'N' or 'S'
        )
        longitude = "%s %s" % (
            format.angle(abs(self.longitude), deg_char, min_char, sec_char),
            self.longitude >= 0 and 'E' or 'W'
        )
        coordinates = [latitude, longitude]
        
        if altitude is None:
            altitude = bool(self.altitude)
        if altitude:
            if not isinstance(altitude, basestring):
                altitude = 'km'
            coordinates.append(self.format_altitude(altitude))
        
        return ", ".join(coordinates)
dataset/ETHPy150Open dgraziotin/dycapo/geopy/point.py/Point.format/original