Skip to content

Bad number of boundary/center points extracted #118

Description

@scottstanie

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions