File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -207,19 +207,21 @@ def load_stac(
207207 """
208208 arguments = {"url" : url }
209209 # TODO: more normalization/validation of extent/band parameters and `properties`
210- if spatial_extent :
210+ if spatial_extent is not None :
211211 arguments ["spatial_extent" ] = spatial_extent
212- if temporal_extent :
212+ if temporal_extent is not None :
213213 arguments ["temporal_extent" ] = DataCube ._get_temporal_extent (temporal_extent )
214- if bands :
214+ if bands is not None :
215215 arguments ["bands" ] = bands
216- if properties :
216+ if properties is not None :
217217 arguments ["properties" ] = properties
218218 cube = self .datacube_from_process (process_id = "load_stac" , ** arguments )
219219 # detect actual metadata from URL
220220 # run load_stac to get the datacube metadata
221- arguments ["spatial_extent" ] = BoundingBox .parse_obj (spatial_extent )
222- arguments ["temporal_extent" ] = TemporalInterval .parse_obj (temporal_extent )
221+ if spatial_extent is not None :
222+ arguments ["spatial_extent" ] = BoundingBox .parse_obj (spatial_extent )
223+ if temporal_extent is not None :
224+ arguments ["temporal_extent" ] = TemporalInterval .parse_obj (temporal_extent )
223225 xarray_cube = load_stac (** arguments )
224226 attrs = xarray_cube .attrs
225227 for at in attrs :
You can’t perform that action at this time.
0 commit comments