From ddc587755a229aeb097df887efc67b188f341614 Mon Sep 17 00:00:00 2001 From: Thomas Vergauwen Date: Thu, 18 Jan 2024 13:32:47 +0100 Subject: [PATCH] conv metadf to geodataframe on pickle import --- metobs_toolkit/dataset.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metobs_toolkit/dataset.py b/metobs_toolkit/dataset.py index b1a03a06..dd923cc0 100644 --- a/metobs_toolkit/dataset.py +++ b/metobs_toolkit/dataset.py @@ -397,6 +397,9 @@ def import_dataset(self, folder_path=None, filename='saved_dataset.pkl'): with open(full_path, 'rb') as inp: dataset = pickle.load(inp) + #convert metadf to a geodataframe (if coordinates are available) + dataset.metadf = metadf_to_gdf(dataset.metadf) + return dataset def add_new_observationtype(self, Obstype):