File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -330,24 +330,9 @@ def from_dict(d: Dict[str, Any]) -> "Extent":
330330 Returns:
331331 Extent: The Extent deserialized from the JSON dict.
332332 """
333-
334- # Handle pre-0.8 spatial extents
335- spatial_extent = d ["spatial" ]
336- if isinstance (spatial_extent , list ):
337- spatial_extent_dict : Dict [str , Any ] = {"bbox" : [spatial_extent ]}
338- else :
339- spatial_extent_dict = spatial_extent
340-
341- # Handle pre-0.8 temporal extents
342- temporal_extent = d ["temporal" ]
343- if isinstance (temporal_extent , list ):
344- temporal_extent_dict : Dict [str , Any ] = {"interval" : [temporal_extent ]}
345- else :
346- temporal_extent_dict = temporal_extent
347-
348333 return Extent (
349- spatial = SpatialExtent .from_dict (spatial_extent_dict ),
350- temporal = TemporalExtent .from_dict (temporal_extent_dict ),
334+ spatial = SpatialExtent .from_dict (d [ "spatial" ] ),
335+ temporal = TemporalExtent .from_dict (d [ "temporal" ] ),
351336 extra_fields = {
352337 k : v for k , v in d .items () if k not in {"spatial" , "temporal" }
353338 },
You can’t perform that action at this time.
0 commit comments