We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 837dfae commit 44a33f0Copy full SHA for 44a33f0
odc/stats/plugins/lc_level34.py
@@ -6,10 +6,10 @@
6
7
import numpy as np
8
import xarray as xr
9
-import os
10
11
from ._registry import StatsPluginInterface, register
12
from ._utils import rasterize_vector_mask
+from osgeo import gdal
13
14
from .l34_utils import (
15
l4_water_persistence,
@@ -46,7 +46,9 @@ def __init__(
46
super().__init__(**kwargs)
47
if urban_mask is None:
48
raise ValueError("Missing urban mask shapefile")
49
- if not os.path.exists(urban_mask):
+
50
+ file_metadata = gdal.VSIStatL(urban_mask)
51
+ if file_metadata is None:
52
raise FileNotFoundError(f"{urban_mask} not found")
53
54
if filter_expression is None:
0 commit comments