def parse_read_options(form, prefix=''):
    """Extract read options from form data.

    Arguments:
        form (obj): Form object

    Keyword Arguments:
        prefix (str): prefix for the form fields (default: {''})

    Returns:
        (dict): Read options key - value dictionary.
    """
    read_options = {
        'encoding': getattr(form, prefix+'encoding').data,
        'delimiter': getattr(form, prefix+'delimiter').data,
    }
    geom = getattr(form, prefix+'geom')
    lat = getattr(form, prefix+'lat')
    lon = getattr(form, prefix+'lon')
    if geom.data != '':
        read_options['geom'] = geom.data
    elif lat.data != '' and lon.data != '':
        read_options['lat'] = lat.data
        read_options['lon'] = lon.data
    return read_options