elevation.cache#
Attributes#
Functions#
|
Build the |
|
Create the product folder and its |
|
Fetch and cache tiles, skipping the tiles already in the cache. |
|
Return whether tile_name is cached, empty tiles included. |
|
|
|
|
|
Return the DEM cache folder to use, as an absolute path. |
Module Contents#
- elevation.cache.build_vrt(root, product)#
Build the
<product>.vrtmosaic over the non empty cache tiles.
- elevation.cache.ensure_setup(root)#
Create the product folder and its
cachesubfolder.The
spoolfolder is created on demand by the cache write.
- elevation.cache.ensure_tiles(root, tiles, prepare_tile, gdal_options=spatial.INT_TILE_GDAL_OPTIONS, empty_on_notfound=True, **kwargs)#
Fetch and cache tiles, skipping the tiles already in the cache.
prepare_tilereturns the GDAL source of the tile, that is read in place and written to the cache as a GeoTIFF.
- elevation.cache.is_cached(root, tile_name)#
Return whether tile_name is cached, empty tiles included.
- elevation.cache.lock_tiles(datasource_root, tile_names)#
- elevation.cache.lock_vrt(datasource_root, product)#
- elevation.cache.resolve_cache_dir(cache_dir)#
Return the DEM cache folder to use, as an absolute path.
The
cache_dirargument takes precedence over theEIO_CACHE_DIRenvironment variable, that takes precedence over theCACHE_DIRdefault.
- elevation.cache.CACHE_DIR: str#
- elevation.cache.FOLDER_LOCKFILE_NAME = '.folder_lock'#
- elevation.cache.Tile#