filter by temporal and perpendicular baseline
-
- Posts: 1
- Joined: Thu Dec 21, 2023 11:53 am America/New_York
filter by temporal and perpendicular baseline
Hi, is it feasible to constrain the baseline endpoint for Sentinel by the temporal and perpendicular baselines or even enable the application of the start/end parameters from the param endpoint?
https://docs.asf.alaska.edu/api/keywords/#baseline-endpoint
Thank you
https://docs.asf.alaska.edu/api/keywords/#baseline-endpoint
Thank you
Filters:
-
- Posts: 1
- Joined: Wed Aug 31, 2022 2:13 pm America/New_York
Re: filter by temporal and perpendicular baseline
Hi @grahamgarvey, Forrest from ASF here. I do not believe this is possible using the API, but you can accomplish this in Vertex, ASF's search website, or by writing some of your own Python code using the asf_search package. I've included a link below to a notebook that demonstrates how to use asf_search to filter by a temporal baseline.
https://nbviewer.org/github/ASFHyP3/hyp3-docs/blob/main/docs/tutorials/hyp3_insar_stack_for_ts_analysis.ipynb
https://nbviewer.org/github/ASFHyP3/hyp3-docs/blob/main/docs/tutorials/hyp3_insar_stack_for_ts_analysis.ipynb
-
- Posts: 3
- Joined: Thu Oct 06, 2022 8:29 pm America/New_York
Re: filter by temporal and perpendicular baseline
Hi!
As of now the SearchAPI baseline endpoint does not offer temporal/perpendicular baseline constraining, nor does it offer additional keyword options beyond `output`, `reference`, and `processingLevel`.
However, the asf-search python search module supports this functionality, below is an example of how to constrain by a start and an end date!
```
import asf_search as asf
from datetime import datetime
reference = 'S1A_IW_SLC__1SSV_20150601T010209_20150601T010236_006173_00808F_20A0-SLC'
START = datetime(2014, 10, 28)
END = datetime(2015, 10, 28)
search_opts = asf.ASFSearchOptions(start=START, end=END)
stack = asf.stack_from_id(reference, opts=search_opts)
print(stack)
```
Technically, the asf-search python module allows using any regular search parameters to constrain final stack results as well. Filtering out by temporal/perpendicular baseline is largely up to the end user, but something
```
MAX_TEMPORAL = 5
MAX_PERPENDICULAR = 200
filteredStack = [product for product in stack if product.properties['temporalBaseline'] < MAX_TEMPORAL and product.properties['perpendicularBaseline'] < MAX_PERPENDICULAR]
```
More info can be found here: https://docs.asf.alaska.edu/asf_search/searching/
Python examples are also available on the asf-search module github page: https://github.com/asfadmin/Discovery-asf_search/tree/stable/examples
As of now the SearchAPI baseline endpoint does not offer temporal/perpendicular baseline constraining, nor does it offer additional keyword options beyond `output`, `reference`, and `processingLevel`.
However, the asf-search python search module supports this functionality, below is an example of how to constrain by a start and an end date!
```
import asf_search as asf
from datetime import datetime
reference = 'S1A_IW_SLC__1SSV_20150601T010209_20150601T010236_006173_00808F_20A0-SLC'
START = datetime(2014, 10, 28)
END = datetime(2015, 10, 28)
search_opts = asf.ASFSearchOptions(start=START, end=END)
stack = asf.stack_from_id(reference, opts=search_opts)
print(stack)
```
Technically, the asf-search python module allows using any regular search parameters to constrain final stack results as well. Filtering out by temporal/perpendicular baseline is largely up to the end user, but something
```
MAX_TEMPORAL = 5
MAX_PERPENDICULAR = 200
filteredStack = [product for product in stack if product.properties['temporalBaseline'] < MAX_TEMPORAL and product.properties['perpendicularBaseline'] < MAX_PERPENDICULAR]
```
More info can be found here: https://docs.asf.alaska.edu/asf_search/searching/
Python examples are also available on the asf-search module github page: https://github.com/asfadmin/Discovery-asf_search/tree/stable/examples
Re: filter by temporal and perpendicular baseline
, The SearchAPI baseline endpoint only accepts output, reference, and (weirdly) processingLevel.
In our python package asf-search, you can pass any additional search options to stack() and stack_from_id()
https://docs.asf.alaska.edu/asf_search/basics/
In our python package asf-search, you can pass any additional search options to stack() and stack_from_id()
https://docs.asf.alaska.edu/asf_search/basics/