Skip to content

Commit

Permalink
Fix gee download bug (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
giswqs authored Mar 1, 2024
1 parent b84145a commit 179f480
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lidar/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ def download_3dep_1m(
if num not in list(range(2, 13)):
raise ValueError("The HUC ID must be 2 to 12 characters long.")

fc = ee.FeatureCollection(f"USGS/WBD/2017/HUC{num}")
fc = ee.FeatureCollection(f"USGS/WBD/2017/HUC{str(num).zfill(2)}")
collection = ee.ImageCollection(f"USGS/3DEP/1m")

roi = fc.filter(ee.Filter.eq(f"huc{num}", huc))
Expand Down Expand Up @@ -989,7 +989,7 @@ def download_3dep_10m(
if num not in list(range(2, 13)):
raise ValueError("The HUC ID must be 2 to 12 characters long.")

fc = ee.FeatureCollection(f"USGS/WBD/2017/HUC{num}")
fc = ee.FeatureCollection(f"USGS/WBD/2017/HUC{str(num).zfill(2)}")
roi = fc.filter(ee.Filter.eq(f"huc{num}", huc))

collection = ee.Image(f"USGS/3DEP/10m")
Expand Down

0 comments on commit 179f480

Please sign in to comment.