diff --git a/pyleotups/utils/PangaeaStudy.py b/pyleotups/utils/PangaeaStudy.py index dc577015..71315483 100644 --- a/pyleotups/utils/PangaeaStudy.py +++ b/pyleotups/utils/PangaeaStudy.py @@ -367,6 +367,30 @@ def get_geo(self) -> pd.DataFrame: "Elevation": ev.elevation, } ) + + # -------------------------------------------------- + # Fallback: dataset-level geometryextent + # -------------------------------------------------- + if not rows: + + geo = getattr(self._panobj, "geometryextent", None) + + if geo: + + rows.append( + { + "StudyID": self.study_id, + "SiteID": None, + "SiteName": None, + "LocationName": None, + "MinLatitude": ( float(geo["southBoundLatitude"]) if geo.get("southBoundLatitude") is not None else None), + "MaxLatitude": ( float(geo["northBoundLatitude"]) if geo.get("northBoundLatitude") is not None else None), + "MinLongitude": ( float(geo["westBoundLongitude"]) if geo.get("westBoundLongitude") is not None else None), + "MaxLongitude": ( float(geo["eastBoundLongitude"]) if geo.get("eastBoundLongitude") is not None else None), + "Elevation": None, + } + ) + return pd.DataFrame(rows) # ------------------------------------------------------------------