ASFHyP3 / hyp3-lib

Common library for HyP3 plugins
BSD 3-Clause "New" or "Revised" License
14 stars 11 forks source link

Specify AOI in cutGeotiffs.py #257

Open pbrotoisworo opened 3 years ago

pbrotoisworo commented 3 years ago

Background

I'm not quite sure if this is the right Hyp3 repo to raise the issue in. Please advise if it is not.

I've been experimenting with Hyp3 InSAR tool from ASF and it is a great service. However, there is one issue that I encounter when downloading them and processing them in MintPy. MintPy requires the images to be the same size and it makes sense that cutGeotiffs will look for the region that has an overlap in all images. The issue is that I cannot easily tell where this region will be in unless I download and process the imagery.

I just ordered 200 image pairs with the AOI polygon being Kansai airport in Osaka, Japan but when I use cutGeotiffs I realized target area is not really captured so I have to download and process again.

Describe the solution you'd like

Specify an AOI in cutGeotiffs that I want to focus on. If it doesn't fit in a image's bounding box then disregard the image.

Alternatives

Options in the Vertex SBAS tool to specify additional filters such as path and frame. Currently there is only date range and temporal/spatial baselines.

Additional context

Legend:

image

What it looks like in the Vertex website when I'm download this data: image

jhkennedy commented 3 years ago

@pbrotoisworo Thanks! This is as good of place as any to open the issue.

We definitely want to provide better guidance/tools on subsetting the actual AOI from products and have some of that work on our backlog. I'll circle back next week with some example code that should help subset products once they are finished.

pbrotoisworo commented 3 years ago

Thanks @jhkennedy!

pbrotoisworo commented 2 years ago

Hello @jhkennedy,

I was downloading some new data from Vertex today and I saw that there is a new SBAS filter called "latitudinal overlap". However I cannot find a description in the ASF manual.

I'm assuming this filters for images that have overlap by at least 50%? If that is the case, maybe it might help in filtering images that have little overlap and prevent the issue I'm encountering in this topic.

jhkennedy commented 2 years ago

@pbrotoisworo the search manual was just updated in asfadmin/asf-data-search-manual#98, so there's some documentation there now.

I don't know if that would qualify as a full solution for you, however, as this will focus on overlap between pairs. "No common bursts" is our most-common failure path for HyP3 InSAR jobs, so this option helps reduce those failures.

pbrotoisworo commented 2 years ago

@jhkennedy

I downloaded the data today but unfortunately it hasn't solved the issue for this Osaka case when I selected a 50% latitudinal overlap. So I will have to wait until January to try again. Would it be feasible for ASF to add the alternative method which are SBAS filters based on paths and frames?

jhkennedy commented 2 years ago

Tagging @glshort; he's a developer of Vertex and the SBAS tool and may be able to get your feature request onto their backlog

@pbrotoisworo you can do SBAS pair picking programatically with asf_search + pandas, which would allow you to filter by path and frame -- you'll have to take care that you get a fully connected network of interferograms, or possibly instead of an SBAS pair picking routine, make pairs all with same reference scene from the baseline_search. Here's a notebook that makes an SBAS stack (it picks a few more pairs than the SBAS tool, so it's not 1-1) programatically: https://gist.github.com/jhkennedy/e9e7ec353b2a05419e50413368ff0505

pbrotoisworo commented 2 years ago

Ah okay, I wasn't aware of this feature with the asf_search library. I'll try it out and update this thread soon.

Arctic-Ambrun commented 2 years ago

Same question of cutGeotiffs.py. if the DInsar pair frame were different, event if there exists a overlap area and the save path, It wont work. I think even 50% overlap wont help. The automatic detection can not help much. Parameters of latitude and longitude must be put in the following updates.

The message is : ERROR: There was no overlap between scenes.

I have made a example test for two Dinsar ASF Products. But the size is larger than 1GB. Parameters here: S1AA_20180725T115009_20180818T115010_VVP024_INT40_G_weF_D52B 593 S1BB_20180824T114915_20181011T114916_VVP048_INT40_G_weF_D970 590

BTW, I think I can help to handle it. With this code below. https://github.com/Arctic-Ambrun/VEG-tools/blob/main/Tutorials/Asf_Mintpy/4_Hyp3_preprocess_extract_clip.ipynb