Skip to content

Commit d699956

Browse files
committed
Hadling possible issues with USGS portal
1 parent e64036d commit d699956

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

hands-on/session II/1.Tutorial.ipynb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,15 @@
175175
"Path(hillshading_tiles).mkdir(parents=True, exist_ok=True)\n",
176176
"Path(slope_tiles).mkdir(parents=True, exist_ok=True)\n",
177177
"\n",
178-
"gt.fetch_dem(\n",
179-
" bbox=region_bounding_box,\n",
180-
" txtPath=download_list,\n",
181-
" dataset=\"National Elevation Dataset (NED) 1 arc-second Current\",\n",
182-
")\n",
178+
"try:\n",
179+
" gt.fetch_dem(\n",
180+
" bbox=region_bounding_box,\n",
181+
" txtPath=download_list,\n",
182+
" dataset=\"National Elevation Dataset (NED) 1 arc-second Current\",\n",
183+
" )\n",
184+
"except Exception as e:\n",
185+
" print(\"USGS portal may be down right now, let's use another source\")\n",
186+
"\n",
183187
"gt.download_files(download_list, tiles_folder)\n",
184188
"print(\"You have successfully downloaded the DEMs from USGS.\")"
185189
]

0 commit comments

Comments
 (0)