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

Codec error on some Sentinel SAFE zip files? #214

Closed
hardreddata opened this issue Dec 23, 2020 · 5 comments
Closed

Codec error on some Sentinel SAFE zip files? #214

hardreddata opened this issue Dec 23, 2020 · 5 comments

Comments

@hardreddata
Copy link
Contributor

Hi,

I am very new to exploring Sentinel-1A data using topsApp.py. Thanks for sharing this great tool.

On some data files I have an encoding issue shortly after starting topsApp. It happens for all swaths in both files.

Could not extract swath 3 from ['/media/storage/sentinel-1a/S1A_IW_SLC__1SDV_20201124T191556_20201124T191623_035394_0422CA_4005.zip']
Generated error:  'utf-8' codec can't decode byte 0x9a in position 14: invalid start byte
2020-12-24 09:23:29,066 - isce.topsinsar.runPreprocessor - INFO - 

I am running Ubuntu 20.04 in Australia. I explored adjusting the LC_ALL environment variable regarding locale settings but couldn't get it to work.

I cannot open these files from relative orbit 147

S1A_IW_SLC__1SDV_20200901T191556_20200901T191623_034169_03F81C_6DF7.zip
S1A_IW_SLC__1SDV_20201124T191556_20201124T191623_035394_0422CA_4005.zip
S1A_IW_SLC__1SDV_20201218T191556_20201218T191623_035744_042ED2_5F7A.zip

I also tried unzipping the files. They open fine in the ESA SNAP software.

Interestingly I can open and process files from relative orbit 9 (which I think doesn't align with the satellite orbit track)

S1A_IW_SLC__1SDV_20200401T083922_20200401T083950_031931_03AFD3_801F.zip
S1A_IW_SLC__1SDV_20200904T083930_20200904T083958_034206_03F960_D105.zip
S1A_IW_SLC__1SDV_20201127T083930_20201127T083958_035431_04241A_E226.zip
S1A_IW_SLC__1SDV_20201209T083930_20201209T083958_035606_042A28_11C3.zip

Any advice is welcome.

Thanks.

@piyushrpt
Copy link
Member

piyushrpt commented Dec 24, 2020

Were those zip files ever copied onto a windows machine and modified there? Seems like a cp1252 vs utf-8 issue.

Also, can you verify that those zip files were downloaded successfully and are the same size as reported on scihub / at ASF. If the zip file was recreated on a windows machine - this could be an issue.

@hardreddata
Copy link
Contributor Author

hardreddata commented Dec 24, 2020 via email

@piyushrpt
Copy link
Member

Is the error during parsing of the SLCs or the orbit files? Can you ensure that the orbits are available and are downloaded correctly.

@piyushrpt
Copy link
Member

You will be able to get better error reporting with something like this

import isce
from isceobj.Sensor.TOPS.Sentinel1 import Sentinel1

reader = Sentinel1()
reader.configure()
reader.safe = ["{safe_zip_name}"]
reader.swathNumber = 3
reader.orbitDir = "{orbit_dir_name}"
reader.parse()

@hardreddata
Copy link
Contributor Author

Hi @piyushrpt

Thanks for the code snippet, and your help.

The problem was zipped orbit data!

The difference between downloading from https://qc.sentinel1.eo.esa.int/aux_poeorb/ and http://step.esa.int/auxdata/orbits/Sentinel-1/POEORB/S1A/2020/11/ ; If I unzip the zipped orbit files everything works fine.

I must have discovered that second site when looking at relative orbit 147, after first looking at relative orbit 9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants