Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,7 @@ tags

# Data
src/multirtc/multimetric/*/

# pixi environments
.pixi/*
!.pixi/config.toml
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.4]

### Fixed
* Copernicus DEM for NISAR URLs to fix 404 errors.

## [0.5.3]

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/multirtc/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def get_dem_granule_url(lat: int, lon: int) -> str:
lon_cardinal = 'W' if lon_tens < 0 else 'E'

prefix = f'{lat_cardinal}{np.abs(lat_tens):02d}/{lat_cardinal}{np.abs(lat_tens):02d}_{lon_cardinal}{np.abs(lon_tens):03d}'
filename = f'DEM{lat_cardinal}{np.abs(lat):02d}_00_{lon_cardinal}{np.abs(lon):03d}_00_C01.tif'
filename = f'DEM_{lat_cardinal}{np.abs(lat):02d}_00_{lon_cardinal}{np.abs(lon):03d}_00_C01.tif'
file_url = f'{URL}/{prefix}/{filename}'
return file_url

Expand Down
2 changes: 1 addition & 1 deletion tests/test_dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_get_granule_url():
test_url = (
'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/DEM/v1.2/EPSG4326/S10/S10_W020/DEMS01_00_W001_00_C01.tif'
'https://nisar.asf.earthdatacloud.nasa.gov/NISAR/DEM/v1.2/EPSG4326/S10/S10_W020/DEM_S01_00_W001_00_C01.tif'
)
url = dem.get_dem_granule_url(-1, -1)
assert url == test_url
Expand Down