Skip to content

Commit

Permalink
Merge branch 'main' into renovate/gunicorn-23.x
Browse files Browse the repository at this point in the history
  • Loading branch information
conbrad authored Aug 12, 2024
2 parents 0b74d25 + a8807f7 commit 4f45e68
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/app/auto_spatial_advisory/elevation.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ async def process_tpi_by_firezone(run_type: RunType, run_date: date, for_date: d
gdal.SetConfigOption("AWS_VIRTUAL_HOSTING", "FALSE")
bucket = config.get("OBJECT_STORE_BUCKET")
dem_file = config.get("CLASSIFIED_TPI_DEM_NAME")

key = f"/vsis3/{bucket}/dem/tpi/{dem_file}"
tpi_source: gdal.Dataset = gdal.Open(key, gdal.GA_ReadOnly)
pixel_size_metres = int(tpi_source.GetGeoTransform()[1])
Expand Down Expand Up @@ -278,7 +277,7 @@ async def process_tpi_by_firezone(run_type: RunType, run_date: date, for_date: d

# Drop TPI class 4, this is the no data value from the TPI raster
tpi_class_freq_dist.pop(4, None)
fire_zone_stats[row[1]] = tpi_class_freq_dist
fire_zone_stats[row[0]] = tpi_class_freq_dist

hfi_masked_tpi = None
return FireZoneTPIStats(fire_zone_stats=fire_zone_stats, pixel_size_metres=pixel_size_metres)
Expand Down

0 comments on commit 4f45e68

Please sign in to comment.