ASFHyP3 / hyp3-gamma

HyP3 plugin for generating SAR products with GAMMA
BSD 3-Clause "New" or "Revised" License
30 stars 6 forks source link

Incorrect map coordinates reported for phase unwrapping reference point #380

Closed asjohnston-asf closed 2 years ago

asjohnston-asf commented 2 years ago

The InSAR workflow reports the reference point used for phase unwrapping in the metadata .txt file included with the final InSAR product. For example:

Azimuth line of the reference point in SAR space: 372
Range pixel of the reference point in SAR space: 89
Y coordinate of the reference point in the map projection: 1579231.323
X coordinate of the reference point in the map projection: 620226.5753
Latitude of the reference point (WGS84): 14.28225615
Longitude of the reference point (WGS84): -91.88538414

The azimuth/range coordinates are reported correctly in SAR space. The UTM and Lat/Lon coordinates are reported incorrectly. This is a result of not specifying the height of the chosen pixel when using sarpix_coord to convert from radar coordinates to map coordinates at https://github.com/ASFHyP3/hyp3-gamma/blob/develop/hyp3_gamma/insar/unwrapping_geocoding.py#L41