pysepal.mapping.tiling.default_cache_dir#

pysepal.mapping.tiling.default_cache_dir()[source]#

The directory prepared rasters are cached in.

A prepared COG is a derived file, so it belongs on scratch rather than in the user’s home: on a SEPAL sandbox the home export is nfs4 and quota’d, which would make every tile read cross the network and charge the user for the copy. scratch_root() is container-local there.

A fixed name under that root rather than scratch_dir(), which mints a unique directory per call and would defeat the caching entirely.

Returns:

$PYSEPAL_TILE_CACHE when set, otherwise pysepal-tiles under the scratch root.

Return type:

Path