Skip to content

Commit

Permalink
Merge pull request #536 from ASFHyP3/legacy
Browse files Browse the repository at this point in the history
Remove support for legacy SRTM/NED DEMs in RTC processing
  • Loading branch information
asjohnston-asf authored Dec 28, 2023
2 parents fb3b1e4 + c8ca037 commit 05666b3
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 614 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ 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).

## [8.0.0]

### Removed
- Support for legacy SRTM/NED DEMs in RTC processing. All RTC processing now uses the Copernicus DEM.
- `legacy` option for the `--dem-name` parameter of `__main__.rtc()`
- `legacy` option for the `--dem-name` parameter of `rtc_sentinel.main()`
- `legacy` option for the `dem_name` parameter of `rtc_sentinel.rtc_sentinel_gamma()`
- `EU_DEM_V11`, `GIMP`, `IFSAR`, `NED13`, `NED1`, `NED2`, `REMA`, `SRTMGL1`, and `SRTMGL3` entries from
`metadata.rtc.SUPPORTED_DEMS`

## [7.0.1]

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion hyp3_gamma/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def rtc():
parser.add_argument('--include-inc-map', type=string_is_true, default=False)
parser.add_argument('--include-scattering-area', type=string_is_true, default=False)
parser.add_argument('--include-rgb', type=string_is_true, default=False)
parser.add_argument('--dem-name', choices=['copernicus', 'legacy'], default='copernicus')
parser.add_argument('--dem-name', choices=['copernicus'], default='copernicus')
parser.add_argument('granule')
args = parser.parse_args()

Expand Down
14 changes: 1 addition & 13 deletions hyp3_gamma/metadata/rtc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from hyp3_gamma.metadata import util


SUPPORTED_DEMS = ['EU_DEM_V11', 'GIMP', 'IFSAR', 'NED13', 'NED1', 'NED2', 'REMA', 'SRTMGL1', 'SRTMGL3', 'GLO-30']
SUPPORTED_DEMS = ['GLO-30']


class RtcMetadataWriter:
Expand Down Expand Up @@ -125,18 +125,6 @@ def create_metadata_file(cls, payload: dict, template: str, reference_file: Path


def get_dem_template_id(dem_name: str) -> Optional[str]:
if dem_name.startswith('EU'):
return 'eu'
if dem_name.startswith('GIMP'):
return 'gimp'
if dem_name.startswith('IFSAR'):
return 'ifsar'
if dem_name.startswith('NED'):
return 'ned'
if dem_name.startswith('REMA'):
return 'rema'
if dem_name.startswith('SRTM'):
return 'srtm'
if dem_name == 'GLO-30':
return 'cop'

Expand Down
84 changes: 0 additions & 84 deletions hyp3_gamma/metadata/templates/dem/dem-eu.xml.j2

This file was deleted.

Loading

0 comments on commit 05666b3

Please sign in to comment.