From c60120494202bcdb7f7bb82dea32251153f33bec Mon Sep 17 00:00:00 2001 From: Eric Fielding Date: Sat, 24 Oct 2020 09:36:08 -0700 Subject: [PATCH] Added code to stripmapStack/topo.py to work with newer GDAL (#196) * added option to pass segment number through unpackFrame_UAVSAR * changed type of segment number * changed segment type in prepareUAVSAR_coregstack * Revert "changed type of segment number" This reverts commit a18c6452d4b5c95ce869dab2ee1e3bcf6ff2b1d9. * Revert "changed segment type in prepareUAVSAR_coregstack" This reverts commit 6cf3ebadb3a6e119c6084c8e03b8cc68d7eccc3f. * changed type of segment number in unpackFrame_UAVSAR * Added code to stripmapStack/topo.py to explicitly create the `geom_reference/hgt.rdr.vrt` file to work with newer GDAL --- contrib/stack/stripmapStack/topo.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/stack/stripmapStack/topo.py b/contrib/stack/stripmapStack/topo.py index 8fe99b3..d88f83d 100755 --- a/contrib/stack/stripmapStack/topo.py +++ b/contrib/stack/stripmapStack/topo.py @@ -13,6 +13,10 @@ from isceobj.Constants import SPEED_OF_LIGHT from isceobj.Util.Poly2D import Poly2D +gdal.UseExceptions() + + + def createParser(): ''' Command line parser. @@ -416,6 +420,8 @@ def runMultilook(in_dir, out_dir, alks, rlks, in_ext='.rdr', out_ext='.rdr', met options_str = '-of ENVI -a_nodata 0 -outsize {ox} {oy} -srcwin 0 0 {sx} {sy} '.format( ox=out_wid, oy=out_len, sx=src_wid, sy=src_len) gdal.Translate(out_file, ds, options=options_str) + dso = gdal.Open(out_file, gdal.GA_ReadOnly) + gdal.Translate(out_file+'.vrt', dso, options=gdal.TranslateOptions(format='VRT')) # generate ISCE .xml file if not os.path.isfile(out_file+'.xml'):