# 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


import re
from prosoar.waypoints.waypoint import Waypoint
from prosoar.waypoints.list import WaypointList
        if runway_dir != '':
            wp.runway_dir = int(runway_dir) * 10

        freq = data[12:17].strip()
        if len(freq) == 5:
            if freq.endswith('2') or freq.endswith('7'):
                freq += '5'
            else:
                freq += '0'
            wp.freq = float(freq) / 1000.

    if wp.name.endswith('GLD'):
        wp.name = wp.name[:-3].strip()
    else:
        wp.name = wp.name.rstrip('!?1 ')

    if re.search('(^|\s)BERG($|\s)', wp.name):
        wp.type = 'mountain top'
    if re.search('(^|\s)COL($|\s)', wp.name):
        wp.type = 'mountain pass'
    if re.search('(^|\s)PASS($|\s)', wp.name):
        wp.type = 'mountain pass'
    if re.search('(^|\s)TOP($|\s)', wp.name):
        wp.type = 'mountain top'
    if re.search('(\s)A(\d){0,3}($|\s)', wp.name):
        wp.type = 'highway exit'
    if re.search('(\s)AB(\d){0,3}($|\s)', wp.name):
        wp.type = 'highway exit'
    if re.search('(\s)BAB(\d){0,3}($|\s)', wp.name):
        wp.type = 'highway exit'

# 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/welt2000_reader.py
import re
from prosoar.waypoints.waypoint import Waypoint
from prosoar.waypoints.list import WaypointList

        if runway_dir != '':
            wp.runway_dir = int(runway_dir) * 10

        freq = data[12:17].strip()
        if len(freq) == 5:
            if freq.endswith('2') or freq.endswith('7'):
                freq += '5'
            else:
                freq += '0'
            wp.freq = float(freq) / 1000.

    if wp.name.endswith('GLD'):
        wp.name = wp.name[:-3].strip()
    else:
        wp.name = wp.name.rstrip('!?1 ')

    if re.search('(^|\s)BERG($|\s)', wp.name):
        wp.type = 'mountain top'
    if re.search('(^|\s)COL($|\s)', wp.name):
        wp.type = 'mountain pass'
    if re.search('(^|\s)PASS($|\s)', wp.name):
        wp.type = 'mountain pass'
    if re.search('(^|\s)TOP($|\s)', wp.name):
        wp.type = 'mountain top'
    if re.search('(\s)A(\d){0,3}($|\s)', wp.name):
        wp.type = 'highway exit'
    if re.search('(\s)AB(\d){0,3}($|\s)', wp.name):
        wp.type = 'highway exit'
    if re.search('(\s)BAB(\d){0,3}($|\s)', wp.name):
        wp.type = 'highway exit'

    if re.search('(\s)(\w){0,3}XA(\d){0,3}($|\s)', wp.name):