def parse_xy(string):
    """Extracts x and y values from strings in a geometry file.

    Parse the x, y values from strings in that have the format: '1x + 2.0y'.

    Args:

        string (str): the string to be parsed.

    Returns:

        x, y (float, float): the values of x and y.
    """

    x = y = 0

    if string.find('x') is not -1:
        xs = string.split('x')[0].split(' ')[-1]
        if len(xs) > 0:
            x = float(xs)
        else:
            x = 1.

    if string.find('y') is not -1:
        ys = string.split('y')[0].split(' ')[-1]
        if len(ys) > 0:
            y = float(ys)
        else:
            y = 1.
    return x, y