Skip to content

Commit

Permalink
ensure antimeridian reads correct files
Browse files Browse the repository at this point in the history
  • Loading branch information
abradley60 committed Jan 16, 2025
1 parent 4409b2c commit 6162e11
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions sar_antarctica/nci/preparation/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,22 @@ def get_cop30_dem_for_bounds(
# Add an additional buffer to ensure full coverage over dateline
left_save_path = '.'.join(str(save_path).split('.')[0:-1]) + "_left." + str(save_path).split('.')[-1]
logging.info(f'Getting tiles for left bounds')
get_cop30_dem_for_bounds(bounds_left, left_save_path, ellipsoid_heights, buffer_pixels=10)
get_cop30_dem_for_bounds(
bounds_left,
left_save_path,
ellipsoid_heights,
buffer_pixels=10,
geoid_tif_path=geoid_tif_path,
cop30_vrt_path=cop30_vrt_path)
right_save_path = '.'.join(str(save_path).split('.')[0:-1]) + "_right." + str(save_path).split('.')[-1]
logging.info(f'Getting tiles for right bounds')
get_cop30_dem_for_bounds(bounds_right, right_save_path, ellipsoid_heights, buffer_pixels=10)
get_cop30_dem_for_bounds(
bounds_right,
right_save_path,
ellipsoid_heights,
buffer_pixels=10,
geoid_tif_path=geoid_tif_path,
cop30_vrt_path=cop30_vrt_path)
# reproject to 3031 and merge
logging.info(f'Reprojecting left and right side of antimeridian to EPGS:{target_crs}')
reproject_raster(left_save_path, left_save_path, target_crs)
Expand Down

0 comments on commit 6162e11

Please sign in to comment.