From 878183efddef8c1a4757bfa4d324207a9acfacd3 Mon Sep 17 00:00:00 2001 From: Conor Brady Date: Mon, 29 Jul 2024 14:45:08 -0700 Subject: [PATCH] use function --- api/app/auto_spatial_advisory/process_hfi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/auto_spatial_advisory/process_hfi.py b/api/app/auto_spatial_advisory/process_hfi.py index 0fcdda2cc..edfa8788b 100644 --- a/api/app/auto_spatial_advisory/process_hfi.py +++ b/api/app/auto_spatial_advisory/process_hfi.py @@ -18,7 +18,7 @@ from app.auto_spatial_advisory.run_type import RunType from app.auto_spatial_advisory.snow import apply_snow_mask from app.geospatial import NAD83_BC_ALBERS -from app.auto_spatial_advisory.hfi_filepath import get_pmtiles_filepath, get_raster_filepath, get_raster_tif_filename +from app.auto_spatial_advisory.hfi_filepath import get_pmtiles_filename, get_pmtiles_filepath, get_raster_filepath, get_raster_tif_filename from app.utils.polygonize import polygonize_in_memory from app.utils.pmtiles import tippecanoe_wrapper, write_geojson from app.utils.s3 import get_client @@ -125,7 +125,7 @@ async def process_hfi(run_type: RunType, run_date: date, run_datetime: datetime, # We need a geojson file to pass to tippecanoe temp_geojson = write_geojson(layer, temp_dir) - pmtiles_filename = f'hfi{for_date.strftime("%Y%m%d")}.pmtiles' + pmtiles_filename = get_pmtiles_filename(for_date) temp_pmtiles_filepath = os.path.join(temp_dir, pmtiles_filename) logger.info(f"Writing pmtiles -- {pmtiles_filename}") tippecanoe_wrapper(temp_geojson, temp_pmtiles_filepath, min_zoom=HFI_PMTILES_MIN_ZOOM, max_zoom=HFI_PMTILES_MAX_ZOOM)