-
Notifications
You must be signed in to change notification settings - Fork 115
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
Unpacking of Sentinel-1 .zip files not working as expected #324
Comments
After chatting with @abradley60 today, we think it could be to do with the change to zip file format that's referenced here https://forum.step.esa.int/t/sentinel-1-latest-datasets-are-corrupted-incomplete/40512/6 I've tried the above minimal working example with
Are you able to confirm whether it's the new format of the zipfiles? It would be interesting to work out an approach that can handle new or old formats. |
Hi @caitlinadams,
So, I am pretty sure it is an issue with the new zipfile format. Would you be willing to try to fix it? I'd really appreciate it. |
Hi @johntruckenbrodt -- that all makes sense, thanks for clarifying! I can certainly have a go -- I'm curious, what do you find is the best approach for editing and testing the code in this repo? Usually with something like this, I would install the package using pip with editable mode, but wasn't sure whether that would work here given the gdal dependencies (so far I've only installed from conda-forge). Any guidance you have for developing the code would be really helpful. |
Thanks Caitlin! So what I usually do is clone the repository, create a mamba environment with all dependencies using the |
Perfect, thanks John. I will have a go and put up a PR if I can come up with a solution |
Hi, thank you for this repository! My colleague @abradley60 has been using the library for IW processing with SNAP, and we are now looking to do EW processing with a GAMMA installation.
I have found a couple of stumbling points for working with the geocode function for GAMMA. The first of these relates to unpacking Sentinel-1 zip files.
Any assistance you can provide would be greatly appreciated!
which operating system are you using?
Rocky Linux release 8.10 (Green Obsidian)
which environment is pyroSAR running in?
Micromamba environment
which version of pyroSAR are you using?
conda forge (pyrosar=0.23.0 in environment.yml file)
which function of pyroSAR did you call with which parameters?
pyroSAR.drivers.SAFE.unpack(directory="/path/to/scene/zip/tmpdir")
Issue
Unpack function fails to unpack zip files. Unpacks the pdf and then fails.
Reviewing the code, I'm wondering whether it would be easier to try using
extractall()
first, then fall back to more manual unpacking? Seehttps://github.com/johntruckenbrodt/pyroSAR/blob/b55b43259e684d202f882d9c1b8655425f88078f/pyroSAR/drivers.py#L758C17-L760C33
At the end of the unpacking step, assuming it runs correctly, there is also code to update the pyroSAR.drivers.SAFE.scene attribute and .file attribute:
https://github.com/johntruckenbrodt/pyroSAR/blob/b55b43259e684d202f882d9c1b8655425f88078f/pyroSAR/drivers.py#L765C9-L767C65
As is, when using this for SAFE directories, the .scene and .file attributes both become the temporary directory:
Without unpacking
gives
Running the following code (taken from unpacking function with variables subsituted):
gives
I'm not sure what these attributes should actually be pointing to, so it would be great if you could confirm that this is the expected behaviour.
Minimum reproducible example:
Note that I use a credential file with my earth data login and password of the form:
Example
Error
Working example:
The text was updated successfully, but these errors were encountered: