def get_points(iso3, sampling_areas, tile_lookup, point_spacing):
    '\n\n    '
    directory = os.path.join(DATA_INTERMEDIATE, iso3, 'sampling_points')
    if (not os.path.exists(directory)):
        os.makedirs(directory)
    sampling_areas = sampling_areas.to_crs('epsg:3857')
    for (idx, sampling_area) in sampling_areas.iterrows():
        lon = sampling_area['geometry'].representative_point().coords[0][0]
        lat = sampling_area['geometry'].representative_point().coords[0][1]
        filename = '{}-{}'.format(lon, lat)
        (xmin, ymin, xmax, ymax) = sampling_area['geometry'].bounds
        polygons = manually_create_grid(xmin, ymin, xmax, ymax, point_spacing, point_spacing)
        grid_sample = gpd.GeoDataFrame({'geometry': polygons}, crs='epsg:3857')
        boundary = gpd.GeoDataFrame({'geometry': sampling_area['geometry']}, crs='epsg:3857', index=[0])
        grid_sample = gpd.overlay(grid_sample, boundary, how='intersection')
        grid_sample = grid_sample.to_crs('epsg:4326')
        sampling_points = find_points(iso3, grid_sample, tile_lookup, filename)
        sampling_points = sampling_points.to_crs('epsg:4326')
        path_output = os.path.join(directory, (filename + '.shp'))
        sampling_points.to_file(path_output)
    return sampling_points
def get_points(iso3, sampling_areas, tile_lookup, point_spacing):
    '\n\n    '
    directory = os.path.join(DATA_INTERMEDIATE, iso3, 'sampling_points')
    if (not os.path.exists(directory)):
        os.makedirs(directory)
    sampling_areas = sampling_areas.to_crs('epsg:3857')
    for (idx, sampling_area) in sampling_areas.iterrows():
        lon = sampling_area['geometry'].representative_point().coords[0][0]
        lat = sampling_area['geometry'].representative_point().coords[0][1]
        filename = '{}-{}'.format(lon, lat)
        (xmin, ymin, xmax, ymax) = sampling_area['geometry'].bounds
        polygons = manually_create_grid(xmin, ymin, xmax, ymax, point_spacing, point_spacing)
        grid_sample = gpd.GeoDataFrame({'geometry': polygons}, crs='epsg:3857')
        boundary = gpd.GeoDataFrame({'geometry': sampling_area['geometry']}, crs='epsg:3857', index=[0])
        grid_sample = gpd.overlay(grid_sample, boundary, how='intersection')
        grid_sample = grid_sample.to_crs('epsg:4326')
        sampling_points = find_points(iso3, grid_sample, tile_lookup, filename)
        sampling_points = sampling_points.to_crs('epsg:4326')
        path_output = os.path.join(directory, (filename + '.shp'))
        sampling_points.to_file(path_output)
    return sampling_points