diff --git a/examples.ipynb b/examples.ipynb index 088e033..8323ac2 100644 --- a/examples.ipynb +++ b/examples.ipynb @@ -2,20 +2,20 @@ "cells": [ { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "2024-06-14 11:18:20,153 - geosyspy.utils.oauth2_client - INFO - Authenticated\n" + "2024-07-31 08:29:17,754 - geosyspy.utils.oauth2_client - INFO - Authenticated\n" ] } ], "source": [ - "from geosyspy import Geosys\n", "import os\n", + "from geosyspy import Geosys\n", "from dotenv import load_dotenv\n", "import datetime as dt\n", "from dateutil.relativedelta import relativedelta\n", @@ -5516,6 +5516,31 @@ "df_new = pd.DataFrame.from_records([data_dict])\n", "df_new\n" ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "download ok\n" + ] + } + ], + "source": [ + "# display difference map\n", + "season_field_id = \"bgbrzez\"\n", + "image_early = \"sentinel-2-l2a%7CS2B_13SGC_20230520_0_L2A\"\n", + "image_late = \"sentinel-2-l2a%7CS2B_13SGC_20230530_0_L2A\"\n", + "image_diff = client.download_image_difference_map(season_field_id=season_field_id,image_id_earliest=image_early,image_id_latest=image_late)\n", + "if image_diff is not None:\n", + " print(\"download ok\")\n", + "else:\n", + " print(\"download nok\")" + ] } ], "metadata": { @@ -5534,7 +5559,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.12.4" } }, "nbformat": 4, diff --git a/geosyspy/services/map_product_service.py b/geosyspy/services/map_product_service.py index c03625c..890264c 100644 --- a/geosyspy/services/map_product_service.py +++ b/geosyspy/services/map_product_service.py @@ -212,7 +212,6 @@ def get_zipped_tiff_difference_map( GeosysApiEndpoints.FLM_BASE_REFERENCE_MAP.value.format(field_id) + parameters, ) - response_zipped_tiff = self.http_client.get( download_tiff_url, {"X-Geosys-Task-Code": PRIORITY_HEADERS[self.priority_queue]},