# Path: prosoar/waypoints/waypoint.py
# class Waypoint(GeoPoint):
#     def __init__(self):
#         self.altitude = 0
#         self.name = ''
#         self.short_name = ''
#         self.icao = ''
#         self.country_code = ''
#         self.surface = None
#         self.runway_len = None
#         self.runway_dir = None
#         self.freq = None
#         self.type = None
# 
#     def __str__(self):
#         return '{}, {}, {}'.format(self.name, super(), self.altitude)
# 
# Path: prosoar/waypoints/list.py
# class WaypointList:
# 
#     def __init__(self):
#         self.__list = []
# 
#     def __len__(self):
#         return len(self.__list)
# 
#     def __getitem__(self, i):
#         if i < 0 or i > len(self):
#             return None
#         return self.__list[i]
# 
#     def __iter__(self):
#         return iter(self.__list)
# 
#     def append(self, wp):
#         if not isinstance(wp, Waypoint):
#             raise TypeError("Waypoint expected")
# 
#         self.__list.append(wp)
# 
#     def extend(self, wp_list):
#         if not isinstance(wp_list, WaypointList):
#             raise TypeError("WaypointList expected")
# 
#         self.__list.extend(wp_list)
# 
#     def get_bounds(self, offset_distance=15.):
#         rc = GeoRect(180, -180, -90, 90)
#         for wp in self.__list:
#             rc.left = min(rc.left, wp.lon)
#             rc.right = max(rc.right, wp.lon)
#             rc.top = max(rc.top, wp.lat)
#             rc.bottom = min(rc.bottom, wp.lat)
# 
#         rc.expand(offset_distance)
#         return rc


from prosoar.waypoints.waypoint import Waypoint
from prosoar.waypoints.list import WaypointList
            if self.__line[i] == '"':
                in_quotes = not in_quotes

            if self.__line[i] == ',' and not in_quotes:
                break

        next = self.__line[self.__index:i +
                           1].rstrip(',').strip('"').replace('\"', '"')
        self.__index = i + 1

        return next


def __parse_altitude(str):
    str = str.lower()
    if str.endswith('ft') or str.endswith('f'):
        str = str.rstrip('ft')
        return int(float(str) * 0.3048)
    else:
        str = str.rstrip('m')
        return int(float(str))


def __parse_coordinate(str):
    str = str.lower()
    negative = str.endswith('s') or str.endswith('w')
    is_lon = str.endswith('e') or str.endswith('w')
    str = str.rstrip('sw') if negative else str.rstrip('ne')

    # degrees + minutes / 60

# Path: prosoar/waypoints/waypoint.py
# class Waypoint(GeoPoint):
#     def __init__(self):
#         self.altitude = 0
#         self.name = ''
#         self.short_name = ''
#         self.icao = ''
#         self.country_code = ''
#         self.surface = None
#         self.runway_len = None
#         self.runway_dir = None
#         self.freq = None
#         self.type = None
# 
#     def __str__(self):
#         return '{}, {}, {}'.format(self.name, super(), self.altitude)
# 
# Path: prosoar/waypoints/list.py
# class WaypointList:
# 
#     def __init__(self):
#         self.__list = []
# 
#     def __len__(self):
#         return len(self.__list)
# 
#     def __getitem__(self, i):
#         if i < 0 or i > len(self):
#             return None
#         return self.__list[i]
# 
#     def __iter__(self):
#         return iter(self.__list)
# 
#     def append(self, wp):
#         if not isinstance(wp, Waypoint):
#             raise TypeError("Waypoint expected")
# 
#         self.__list.append(wp)
# 
#     def extend(self, wp_list):
#         if not isinstance(wp_list, WaypointList):
#             raise TypeError("WaypointList expected")
# 
#         self.__list.extend(wp_list)
# 
#     def get_bounds(self, offset_distance=15.):
#         rc = GeoRect(180, -180, -90, 90)
#         for wp in self.__list:
#             rc.left = min(rc.left, wp.lon)
#             rc.right = max(rc.right, wp.lon)
#             rc.top = max(rc.top, wp.lat)
#             rc.bottom = min(rc.bottom, wp.lat)
# 
#         rc.expand(offset_distance)
#         return rc


# Path: prosoar/waypoints/seeyou_reader.py
from prosoar.waypoints.waypoint import Waypoint
from prosoar.waypoints.list import WaypointList

            if self.__line[i] == '"':
                in_quotes = not in_quotes

            if self.__line[i] == ',' and not in_quotes:
                break

        next = self.__line[self.__index:i +
                           1].rstrip(',').strip('"').replace('\"', '"')
        self.__index = i + 1

        return next


def __parse_altitude(str):
    str = str.lower()
    if str.endswith('ft') or str.endswith('f'):
        str = str.rstrip('ft')
        return int(float(str) * 0.3048)
    else:
        str = str.rstrip('m')
        return int(float(str))


def __parse_coordinate(str):
    str = str.lower()
    negative = str.endswith('s') or str.endswith('w')
    is_lon = str.endswith('e') or str.endswith('w')
    str = str.rstrip('sw') if negative else str.rstrip('ne')

    # degrees + minutes / 60

    if is_lon: