Skip to content

Commit

Permalink
save_hdfeos5: UTM support for --subset mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yunjunz committed Mar 18, 2024
1 parent 0e8fe23 commit c64d497
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/mintpy/save_hdfeos5.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ def get_output_filename(metadata, suffix=None, update_mode=False, subset_mode=Fa
lat0 = lat1 + float(metadata['Y_STEP']) * int(metadata['LENGTH'])
lon1 = lon0 + float(metadata['X_STEP']) * int(metadata['WIDTH'])

# convert UTM to lat/lon
if not metadata.get('Y_UNIT', 'degrees').lower().startswith('deg'):
[lat0, lat1], [lon0, lon1] = ut.utm2latlon(metadata, easting=[lon0, lon1], northing=[lat0, lat1])

lat0Str = f'N{round(lat0*1e3):05d}'
lat1Str = f'N{round(lat1*1e3):05d}'
lon0Str = f'E{round(lon0*1e3):06d}'
Expand Down

0 comments on commit c64d497

Please sign in to comment.