Skip to content

Commit

Permalink
Update: expample.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
KarineGEO6 committed Jul 31, 2024
1 parent 1b9f971 commit 59688c1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
33 changes: 29 additions & 4 deletions examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": {
Expand All @@ -5534,7 +5559,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
1 change: 0 additions & 1 deletion geosyspy/services/map_product_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]},
Expand Down

0 comments on commit 59688c1

Please sign in to comment.