ASFHyP3 / hyp3-docs

Documentation for HyP3 products and services
https://hyp3-docs.asf.alaska.edu/
BSD 3-Clause "New" or "Revised" License
11 stars 10 forks source link

hyp3_insar_stack_for_ts_analysis.ipynb permutes corners #469

Open feigl opened 1 month ago

feigl commented 1 month ago

In the example notebook https://github.com/ASFHyP3/hyp3-docs/blob/main/docs/tutorials/hyp3_insar_stack_for_ts_analysis.ipynb The function named get_common_overlap permutes the corners. This issue appeared in an ascending swath where the area of interest was slightly off the western edge, i.e. with longitude between the longitudes of the NW and SW corners. This case is rare.

Here is the corrected code:

    # 2024/09/21 This looks strange 
    # ulx = max(corner['upperLeft'][0] for corner in corners)
    # uly = min(corner['upperLeft'][1] for corner in corners)
    # lrx = min(corner['lowerRight'][0] for corner in corners)
    # lry = max(corner['lowerRight'][1] for corner in corners)

    # 2024/09/24 x coordinate is UTM easting, mininum is to our left, i.e. west edge
    ulx = min(corner['upperLeft'][0] for corner in corners)
    uly = max(corner['upperLeft'][1] for corner in corners)
    lrx = max(corner['lowerRight'][0] for corner in corners)
    lry = min(corner['lowerRight'][1] for corner in corners)

search3utm

asjohnston-asf commented 1 month ago

The get_common_overlap() function returns the intersection of the input geometries. Your revisions would instead return the union of the input geometries. Either is a reasonable approach, and I agree the behavior of the function could be made more clear in the docstring.

Using the intersection of the input interferograms restricts the time series to the region where every input interferogram contributes and guarantees a fully-connected network for the entire region.

Using the union of the input interferograms expands the time series to the region where any input interfergoram contributes, but outlying areas not covered by all interferograms (like your example) will have a less-connected network through time. You could get similar results by removing interferograms not covering your area of interest from your list prior to section #3 of the notebook.

asjohnston-asf commented 1 month ago

If your area of interest is small, burst-based InSAR may be a better fit than SLC-based InSAR. Sentinel-1 bursts are consistently geolocated through time, eliminating the case where your area of interest is covered by some interferograms in your stack but not by others.