Skip to content

Commit

Permalink
Merge pull request #472 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
Release v6.2.4
  • Loading branch information
cirrusasf authored Aug 16, 2023
2 parents e304f18 + 36adb7d commit ae279a3
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ on:

jobs:
call-changelog-check-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/create-jira-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
call-create-jira-issue-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeled-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ on:

jobs:
call-labeled-pr-check-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
2 changes: 1 addition & 1 deletion .github/workflows/release-template-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
call-release-checklist-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
secrets:
USER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
call-release-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
with:
release_prefix: HyP3 GAMMA
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on: push

jobs:
call-flake8-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
with:
local_package_names: hyp3_gamma

call-secrets-analysis-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
2 changes: 1 addition & 1 deletion .github/workflows/tag-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ on:

jobs:
call-bump-version-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
secrets:
USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }}
4 changes: 2 additions & 2 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ env:

jobs:
call-pytest-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
with:
local_package_name: hyp3_gamma
python_versions: >-
["3.10"]
call-version-info-workflow:
uses: ASFHyP3/actions/.github/workflows/[email protected].0
uses: ASFHyP3/actions/.github/workflows/[email protected].1
with:
python_version: '3.10'

Expand Down
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).

## [6.2.4]

### Changed
- Remove the NoData setting in the output dem.tif

## [6.2.3]

### Added
Expand Down
2 changes: 1 addition & 1 deletion hyp3_gamma/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ def prepare_dem_geotiff(output_name: str, geometry: ogr.Geometry, pixel_size: fl

with TemporaryDirectory() as temp_dir:
temp_path = Path(temp_dir)

centroid = geometry.Centroid()
dem_file_paths = get_dem_file_paths(geometry.Buffer(0.15))

if geometry.GetGeometryName() == 'MULTIPOLYGON':
centroid = get_centroid_crossing_antimeridian(geometry)

dem_file_paths = shift_for_antimeridian(dem_file_paths, temp_path)

dem_vrt = temp_path / 'dem.vrt'
Expand Down
4 changes: 3 additions & 1 deletion hyp3_gamma/rtc/rtc_sentinel.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def prepare_dem(safe_dir: str, dem_name: str, bbox: List[float] = None, dem: str
geometry = ogr.CreateGeometryFromWkt(wkt)
else:
geometry = get_geometry_from_kml(f'{safe_dir}/preview/map-overlay.kml')

prepare_dem_geotiff(dem_tif, geometry, pixel_size)
run(f'dem_import {dem_tif} {dem_image} {dem_par} - - $DIFF_HOME/scripts/egm2008-5.dem '
f'$DIFF_HOME/scripts/egm2008-5.dem_par - - - 1')
Expand Down Expand Up @@ -390,7 +391,8 @@ def rtc_sentinel_gamma(safe_dir: str, resolution: float = 30.0, radiometry: str
if include_dem:
with NamedTemporaryFile() as temp_file:
run(f'data2geotiff dem_seg.par dem_seg 2 {temp_file.name}')
gdal.Translate(f'{product_name}/{product_name}_dem.tif', temp_file.name, outputType=gdalconst.GDT_Int16)
gdal.Translate(f'{product_name}/{product_name}_dem.tif', temp_file.name, noData="none",
outputType=gdalconst.GDT_Int16)
if include_inc_map:
run(f'data2geotiff dem_seg.par corrected.inc_map 2 {product_name}/{product_name}_inc_map.tif')
if include_scattering_area:
Expand Down

0 comments on commit ae279a3

Please sign in to comment.