From c08df417cd26a371c1c0581fdce6254384f9342c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dries=20De=20Bi=C3=A8vre?= <dries.debievre@uclouvain.be> Date: Mon, 3 Feb 2025 15:00:42 +0100 Subject: [PATCH] correction to not overwrite filenames --- .../access_data/roi/region_of_interest_2025.ipynb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/source/access_data/roi/region_of_interest_2025.ipynb b/docs/source/access_data/roi/region_of_interest_2025.ipynb index 594888e..d27abbc 100644 --- a/docs/source/access_data/roi/region_of_interest_2025.ipynb +++ b/docs/source/access_data/roi/region_of_interest_2025.ipynb @@ -111,7 +111,7 @@ "\n", "roi_src_filename = 'roi_wgs84.shp'\n", "\n", - "roi_file = f'{roi_path}{roi_src_filename}'" + "roi_src_file = f'{roi_path}{roi_src_filename}'" ] }, { @@ -192,11 +192,11 @@ ], "source": [ "\n", - "roi_filename = f'roi_{crs_dst[5:]}.shp'\n", + "roi_dst_filename = f'roi_{crs_dst[5:]}.shp'\n", "\n", - "roi_file = f'{roi_path}{roi_filename}'\n", + "roi_dst_file = f'{roi_path}{roi_dst_filename}'\n", "\n", - "print(f'ROI shapefile will be stored in : {roi_file}')" + "print(f'ROI shapefile will be stored in : {roi_dst_file}')" ] }, { @@ -238,9 +238,9 @@ } ], "source": [ - "if not os.path.isfile(roi_file):\n", - " gdf_reproj.to_file(filename=roi_file, driver='ESRI Shapefile')\n", - " print(f'A new vector file is created : {roi_file}')\n", + "if not os.path.isfile(roi_dst_file):\n", + " gdf_reproj.to_file(filename=roi_dst_file, driver='ESRI Shapefile')\n", + " print(f'A new vector file is created : {roi_dst_file}')\n", "\n", "else:\n", " print('The ROI vector file already exists --> delete it or change the variable \"roi_name\" if you want to create a new one')" -- GitLab