Parse XSEC Method

def xSectionChunk(lines):
    """
    Parse XSEC Method
    """
    # Constants
    KEYWORDS = ('MANNINGS_N',
                'BOTTOM_WIDTH',
                'BANKFULL_DEPTH',
                'SIDE_SLOPE',
                'NPAIRS',
                'NUM_INTERP',
                'X1',
                'ERODE',
                'MAX_EROSION',
                'SUBSURFACE',
                'M_RIVER',
                'K_RIVER')

    result = {'mannings_n': None,
              'bottom_width': None,
              'bankfull_depth': None,
              'side_slope': None,
              'npairs': None,
              'num_interp': None,
              'erode': False,
              'subsurface': False,
              'max_erosion': None,
              'm_river': None,
              'k_river': None,
              'breakpoints': []}

    chunks = pt.chunk(KEYWORDS, lines)

    # Parse chunks associated with each key
    for key, chunkList in iteritems(chunks):
        # Parse each chunk in the chunk list
        for chunk in chunkList:
            # Strip and split the line (only one item in each list)
            schunk = chunk[0].strip().split()

            # Cases
            if key == 'X1':
                # Extract breakpoint XY pairs
                x = schunk[1]
                y = schunk[2]
                result['breakpoints'].append({'x': x, 'y': y})

            if key in ('SUBSURFACE', 'ERODE'):
                # Set booleans
                result[key.lower()] = True

            else:
                # Extract value
                result[key.lower()] = schunk[1]
    return result