elevation.cache =============== .. py:module:: elevation.cache Attributes ---------- .. autoapisummary:: elevation.cache.CACHE_DIR elevation.cache.FOLDER_LOCKFILE_NAME elevation.cache.Tile Functions --------- .. autoapisummary:: elevation.cache.build_vrt elevation.cache.ensure_setup elevation.cache.ensure_tiles elevation.cache.is_cached elevation.cache.lock_tiles elevation.cache.lock_vrt elevation.cache.resolve_cache_dir Module Contents --------------- .. py:function:: build_vrt(root, product) Build the ``.vrt`` mosaic over the non empty cache tiles. .. py:function:: ensure_setup(root) Create the product folder and its ``cache`` subfolder. The ``spool`` folder is created on demand by the cache write. .. py:function:: 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_tile`` returns the GDAL source of the tile, that is read in place and written to the cache as a GeoTIFF. .. py:function:: is_cached(root, tile_name) Return whether *tile_name* is cached, empty tiles included. .. py:function:: lock_tiles(datasource_root, tile_names) .. py:function:: lock_vrt(datasource_root, product) .. py:function:: resolve_cache_dir(cache_dir) Return the DEM cache folder to use, as an absolute path. The ``cache_dir`` argument takes precedence over the ``EIO_CACHE_DIR`` environment variable, that takes precedence over the ``CACHE_DIR`` default. .. py:data:: CACHE_DIR :type: str .. py:data:: FOLDER_LOCKFILE_NAME :value: '.folder_lock' .. py:data:: Tile