Skip to content

Commit b388865

Browse files
committed
Remove support for pre-0.8 extents
1 parent b173ede commit b388865

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

pystac/collection.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff 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
},

0 commit comments

Comments
 (0)