(cache_dir=CACHE_DIR, product=DEFAULT_PRODUCT, bounds=None, max_download_tiles=9, **kwargs)
return datasource_root
Seed the DEM to given bounds.

    :param cache_dir: Root of the DEM cache folder.
    :param product: DEM product choice.
    :param bounds: Output bounds in 'left bottom right top' order.
    :param max_download_tiles: Maximum number of tiles to process.
    :param kwargs: Pass additional kwargs to ensure_tiles.
Seed the DEM to given bounds.
Seed the DEM to given bounds .
def seed(cache_dir=CACHE_DIR, product=DEFAULT_PRODUCT, bounds=None, max_download_tiles=9, **kwargs):
    """Seed the DEM to given bounds.

    :param cache_dir: Root of the DEM cache folder.
    :param product: DEM product choice.
    :param bounds: Output bounds in 'left bottom right top' order.
    :param max_download_tiles: Maximum number of tiles to process.
    :param kwargs: Pass additional kwargs to ensure_tiles.
    """
    datasource_root, spec = ensure_setup(cache_dir, product)
    ensure_tiles_names = list(spec['tile_names'](*bounds))
    # FIXME: emergency hack to enforce the no-bulk-download policy
    if len(ensure_tiles_names) > max_download_tiles:
        raise RuntimeError(
            "Too many tiles: %d. Please consult the providers' websites "
            "for how to bulk download tiles." % len(ensure_tiles_names)
        )

    with util.lock_tiles(datasource_root, ensure_tiles_names):
        ensure_tiles(datasource_root, ensure_tiles_names, **kwargs)

    with util.lock_vrt(datasource_root, product):
        util.check_call_make(datasource_root, targets=['all'])
    return datasource_root
def seed ( cache_dir = CACHE_DIR , product = DEFAULT_PRODUCT , bounds = None , max_download_tiles = 9 , * * kwargs ) : datasource_root , spec = ensure_setup ( cache_dir , product ) ensure_tiles_names = list ( spec [ 'tile_names' ] ( * bounds ) ) # FIXME: emergency hack to enforce the no-bulk-download policy if len ( ensure_tiles_names ) > max_download_tiles : raise RuntimeError ( "Too many tiles: %d. Please consult the providers' websites " "for how to bulk download tiles." % len ( ensure_tiles_names ) ) with util . lock_tiles ( datasource_root , ensure_tiles_names ) : ensure_tiles ( datasource_root , ensure_tiles_names , * * kwargs ) with util . lock_vrt ( datasource_root , product ) : util . check_call_make ( datasource_root , targets = [ 'all' ] ) return datasource_root