# Path: geopy/units.py
# def degrees(radians=0, arcminutes=0, arcseconds=0):
# def radians(degrees=0, arcminutes=0, arcseconds=0):
# def arcminutes(degrees=0, radians=0, arcseconds=0):
# def arcseconds(degrees=0, radians=0, arcminutes=0):
# def kilometers(meters=0, miles=0, feet=0, nautical=0):
# def meters(kilometers=0, miles=0, feet=0, nautical=0):
# def miles(kilometers=0, meters=0, feet=0, nautical=0):
# def feet(kilometers=0, meters=0, miles=0, nautical=0):
# def nautical(kilometers=0, meters=0, miles=0, feet=0):
# 
# Path: geopy/util.py
# NUMBER_TYPES = (int, float, Decimal)
# def pairwise(seq):
# def join_filter(sep, seq, pred=bool):
# def get_version():
# 
# Path: geopy/format.py
# DEGREE = chr(176)
# 
# DOUBLE_PRIME = chr(8243)
# 
# PRIME = chr(8242)
# 
# def format_degrees(degrees, fmt=DEGREES_FORMAT, symbols=None):
#     """
#     TODO docs.
#     """
#     symbols = symbols or ASCII_SYMBOLS
#     arcminutes = units.arcminutes(degrees=degrees - int(degrees))
#     arcseconds = units.arcseconds(arcminutes=arcminutes - int(arcminutes))
#     format_dict = dict(
#         symbols,
#         degrees=degrees,
#         minutes=abs(arcminutes),
#         seconds=abs(arcseconds)
#     )
#     return fmt % format_dict
# 
# def format_distance(kilometers, fmt=DISTANCE_FORMAT, unit='km'):
#     """
#     TODO docs.
#     """
#     magnitude = DISTANCE_UNITS[unit](kilometers)
#     return fmt % {'magnitude': magnitude, 'unit': unit}


import collections.abc
import re
import warnings
from itertools import islice
from math import fmod, isfinite
from geopy import units, util
from geopy.format import DEGREE, DOUBLE_PRIME, PRIME, format_degrees, format_distance
            return degrees
        elif direction in ['S', 'W']:
            return -degrees
        else:
            raise ValueError("Invalid direction! Should be one of [NSEW].")

    @classmethod
    def parse_altitude(cls, distance, unit):
        """
        Parse altitude managing units conversion::

            >>> Point.parse_altitude(712, 'm')
            0.712
            >>> Point.parse_altitude(712, 'km')
            712.0
            >>> Point.parse_altitude(712, 'mi')
            1145.852928

        :param float distance: Numeric value of altitude.
        :param str unit: ``distance`` unit. Supported units
            are listed in :meth:`.from_string` doc.
        """
        if distance is not None:
            distance = float(distance)
            CONVERTERS = {
                'km': lambda d: d,
                'm': lambda d: units.kilometers(meters=d),
                'mi': lambda d: units.kilometers(miles=d),
                'ft': lambda d: units.kilometers(feet=d),
                'nm': lambda d: units.kilometers(nautical=d),

# Path: geopy/units.py
# def degrees(radians=0, arcminutes=0, arcseconds=0):
# def radians(degrees=0, arcminutes=0, arcseconds=0):
# def arcminutes(degrees=0, radians=0, arcseconds=0):
# def arcseconds(degrees=0, radians=0, arcminutes=0):
# def kilometers(meters=0, miles=0, feet=0, nautical=0):
# def meters(kilometers=0, miles=0, feet=0, nautical=0):
# def miles(kilometers=0, meters=0, feet=0, nautical=0):
# def feet(kilometers=0, meters=0, miles=0, nautical=0):
# def nautical(kilometers=0, meters=0, miles=0, feet=0):
# 
# Path: geopy/util.py
# NUMBER_TYPES = (int, float, Decimal)
# def pairwise(seq):
# def join_filter(sep, seq, pred=bool):
# def get_version():
# 
# Path: geopy/format.py
# DEGREE = chr(176)
# 
# DOUBLE_PRIME = chr(8243)
# 
# PRIME = chr(8242)
# 
# def format_degrees(degrees, fmt=DEGREES_FORMAT, symbols=None):
#     """
#     TODO docs.
#     """
#     symbols = symbols or ASCII_SYMBOLS
#     arcminutes = units.arcminutes(degrees=degrees - int(degrees))
#     arcseconds = units.arcseconds(arcminutes=arcminutes - int(arcminutes))
#     format_dict = dict(
#         symbols,
#         degrees=degrees,
#         minutes=abs(arcminutes),
#         seconds=abs(arcseconds)
#     )
#     return fmt % format_dict
# 
# def format_distance(kilometers, fmt=DISTANCE_FORMAT, unit='km'):
#     """
#     TODO docs.
#     """
#     magnitude = DISTANCE_UNITS[unit](kilometers)
#     return fmt % {'magnitude': magnitude, 'unit': unit}


# Path: geopy/point.py
import collections.abc
import re
import warnings
from itertools import islice
from math import fmod, isfinite
from geopy import units, util
from geopy.format import DEGREE, DOUBLE_PRIME, PRIME, format_degrees, format_distance

            return degrees
        elif direction in ['S', 'W']:
            return -degrees
        else:
            raise ValueError("Invalid direction! Should be one of [NSEW].")

    @classmethod
    def parse_altitude(cls, distance, unit):
        """
        Parse altitude managing units conversion::

            >>> Point.parse_altitude(712, 'm')
            0.712
            >>> Point.parse_altitude(712, 'km')
            712.0
            >>> Point.parse_altitude(712, 'mi')
            1145.852928

        :param float distance: Numeric value of altitude.
        :param str unit: ``distance`` unit. Supported units
            are listed in :meth:`.from_string` doc.
        """
        if distance is not None:
            distance = float(distance)
            CONVERTERS = {
                'km': lambda d: d,
                'm': lambda d: units.kilometers(meters=d),
                'mi': lambda d: units.kilometers(miles=d),
                'ft': lambda d: units.kilometers(feet=d),
                'nm': lambda d: units.kilometers(nautical=d),

                'nmi': lambda d: units.kilometers(nautical=d)