Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad number of boundary/center points extracted #118

Open
scottstanie opened this issue May 27, 2023 · 2 comments
Open

Bad number of boundary/center points extracted #118

scottstanie opened this issue May 27, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@scottstanie
Copy link
Contributor

scottstanie commented May 27, 2023

Steps to reproduce

$ asfsmd S1A_IW_SLC__1SDV_20150124T165546_20150124T165613_004316_005423_ADFE
$ s1_info S1A_IW_SLC__1SDV_20150124T165546_20150124T165613_004316_005423_ADFE.SAFE/

Error:

Traceback (most recent call last):
  File "/Users/staniewi/miniconda3/envs/mapping/bin/s1_info", line 8, in <module>
    sys.exit(main())
  File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_info.py", line 262, in main
    for burst in get_bursts(path, args.pol, args.iw):
  File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_info.py", line 26, in get_bursts
    burst_nested_list = [
  File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_info.py", line 27, in <listcomp>
    s1reader.load_bursts(filename, None, iw, pol, flag_apply_eap=False)
  File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_reader.py", line 878, in load_bursts
    bursts = _burst_from_safe_dir(path, id_str, orbit_path,
  File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_reader.py", line 997, in _burst_from_safe_dir
    bursts = burst_from_xml(f_annotation, orbit_path, f_tiff, iw2_f_annotation,
  File "/Users/staniewi/repos/s1-reader/src/s1reader/s1_reader.py", line 795, in burst_from_xml
    platform_id, safe_filename, center_pts[i],
IndexError: list index out of range

Inside get_burst_centers_and_boundaries:

ipdb> p center_pts
[<POINT (14.688 36.912)>, <POINT (14.649 37.078)>, <POINT (14.61 37.244)>, <POINT (14.571 37.41)>, <POINT (14.531 37.575)>, <POINT (14.492 37.741)>, <POINT (14.453 37.907)>, <POINT (14.409 38.09)>]
ipdb> p len(center_pts)
8

but,

ipdb> p len(burst_list_elements)
9
@scottstanie scottstanie added the bug Something isn't working label May 27, 2023
@scottstanie
Copy link
Contributor Author

scottstanie commented May 28, 2023

more failing zips over italy, all early in 2015

S1A_IW_SLC__1SDV_20150205T165551_20150205T165618_004491_00581E_9231.zip
S1A_IW_SLC__1SDV_20150217T165526_20150217T165554_004666_005C23_3BC5.zip

@seongsujeong
Copy link
Contributor

seongsujeong commented Sep 12, 2023

Same issue was found from the granule S1A_IW_SLC__1SSV_20150308T135919_20150308T135946_004941_0062CC_02DF.zip Based on what I investigated, looks like the issue is coming from the annotation file, especially geolocationGridPointList.

All of the inconsistent cases we see here are very old data. I guess this issue take place only on some of the historical data, but I don't have clear evidence to support my hypothesis.

I have written a temporary workaround in the PR #134 to extrapolate the polygon in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants