Mahmudm commited on
Commit
1dc4911
·
verified ·
1 Parent(s): 82c899e

Update ash_animator/basemaps.py

Browse files
Files changed (1) hide show
  1. ash_animator/basemaps.py +8 -2
ash_animator/basemaps.py CHANGED
@@ -42,8 +42,14 @@ import matplotlib.pyplot as plt
42
  # Optional: Set tile cache directory (must be done before contextily downloads tiles)
43
  os.environ["XDG_CACHE_HOME"] = os.path.expanduser("~/.contextily_cache")
44
 
45
- CTX_TILE_CACHE_DIR = os.path.expanduser("~/.contextily_cache")
46
- BASEMAP_TILE_CACHE_DIR = os.path.expanduser("~/.basemap_cache")
 
 
 
 
 
 
47
 
48
  os.makedirs(CTX_TILE_CACHE_DIR, exist_ok=True)
49
  os.makedirs(BASEMAP_TILE_CACHE_DIR, exist_ok=True)
 
42
  # Optional: Set tile cache directory (must be done before contextily downloads tiles)
43
  os.environ["XDG_CACHE_HOME"] = os.path.expanduser("~/.contextily_cache")
44
 
45
+ #CTX_TILE_CACHE_DIR = os.path.expanduser("~/.contextily_cache")
46
+ #BASEMAP_TILE_CACHE_DIR = os.path.expanduser("~/.basemap_cache")
47
+
48
+ import tempfile
49
+
50
+ CTX_TILE_CACHE_DIR = os.path.join(tempfile.gettempdir(), "contextily_cache")
51
+ os.makedirs(CTX_TILE_CACHE_DIR, exist_ok=True)
52
+
53
 
54
  os.makedirs(CTX_TILE_CACHE_DIR, exist_ok=True)
55
  os.makedirs(BASEMAP_TILE_CACHE_DIR, exist_ok=True)