Skip to content

Commit d9d4670

Browse files
authored
Merge pull request #13 from cirrusasf/jz_pfa_split
v0.7.3 fix a calculation of min and max height of DEM to speed up the RTC process
2 parents 466279c + 2408c1a commit d9d4670

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/)
77
and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

9+
## [0.7.3]
10+
#### Fixed
11+
* correly calcualte the min and max values of the dem raster to produce geogrid, largely imporve the RTC process speed.
12+
913
## [0.7.2]
1014
### Fixed
1115
* clip the RTC output of UMBRA to the shape of what is defined in the json file.

src/multirtc/define_geogrid.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,9 @@ def generate_geogrids(
136136
min_height = isce3.core.MINIMUM_HEIGHT
137137
max_height = isce3.core.MAXIMUM_HEIGHT
138138
else:
139-
dem_raster = isce3.io.Raster(str(dem_path))
140-
dem = isce3.geometry.DEMInterpolator()
141-
# FIXME: figure out why load with bounds doesn't work
142-
# minx, miny, maxx, maxy = slc.footprint.bounds
143-
# dem.load_dem(dem_raster, min_x=minx, max_x=maxx, min_y=miny, max_y=maxy)
144-
dem.load_dem(dem_raster)
145-
dem.compute_min_max_mean_height()
146-
min_height = dem.min_height
147-
max_height = dem.max_height
139+
with rasterio.open(str(dem_path)) as src:
140+
min_height = (src.stats()[0]).min
141+
max_height = (src.stats()[0]).max
148142

149143
geogrid = isce3.product.bbox_to_geogrid(
150144
slc.radar_grid,

0 commit comments

Comments
 (0)