Hello,
I have downloaded quite a few Sentinel-1 IW GRD images from the archive via the python API and almost every zipped folder is corrupted.
Example image: S1A_IW_GRDH_1SDV_20190412T221928_20190412T221953_026763_030196_962B
When trying to run the imagery with snappy I get the error when I try to open them:
SEVERE: org.esa.snap.core.dataio.ProductIO: Error attempting to read: Z:\free_sat_downloads\sentinel1\nb2019\GRD\florenceville_copy\S1A_IW_GRDH_1SDV_20190412T221928_20190412T221953_026763_030196_962B.zip with plugin reader org.esa.s2tbx.dataio.s2.ortho.plugins.Sentinel2L1CProduct_Multi_UTM13S_ReaderPlugIn@3bd6ba24 java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException at org.esa.s2tbx.dataio.VirtualDirEx.build(VirtualDirEx.java:101) at org.esa.s2tbx.dataio.s2.filepatterns.S2NamingConventionUtils.transformToSentinel2VirtualPath(S2NamingConventionUtils.java:306) at org.esa.s2tbx.dataio.s2.ortho.S2ProductCRSCache$S2ProductCRSCacheEntry.<init>(S2ProductCRSCache.java:57) at org.esa.s2tbx.dataio.s2.ortho.S2ProductCRSCache.ensureIsCached(S2ProductCRSCache.java:155) at org.esa.s2tbx.dataio.s2.ortho.S2OrthoProductReaderPlugIn.getDecodeQualification(S2OrthoProductReaderPlugIn.java:101) at org.esa.snap.core.dataio.ProductIO.getProductReaderForInput(ProductIO.java:301) at org.esa.snap.core.dataio.ProductIO.readProductImpl(ProductIO.java:252) at org.esa.snap.core.dataio.ProductIO.readProduct(ProductIO.java:204) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedConstructorAccessor8.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.esa.snap.engine_utilities.util.ZipFileSystemBuilder.newZipFileSystem(ZipFileSystemBuilder.java:48) at org.esa.snap.engine_utilities.util.FileSystemUtils.isZipFile(FileSystemUtils.java:24) at org.esa.s2tbx.dataio.VirtualDirEx.build(VirtualDirEx.java:99) ... 7 more Caused by: java.util.zip.ZipError: zip END header not found at com.sun.nio.zipfs.ZipFileSystem.zerror(ZipFileSystem.java:1605) at com.sun.nio.zipfs.ZipFileSystem.findEND(ZipFileSystem.java:1021) at com.sun.nio.zipfs.ZipFileSystem.initCEN(ZipFileSystem.java:1030) at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:130) ... 13 more
and this error when I try to unzip the folder with 7zip (“unexpected end of data” error):
I have contacted support but I don’t know if they can help much and I read through this thread but it seems like there was no resolution.
I have also tried changing the “.zip” manually to “.nc” after reading this. I can then read in the file with snappy but as soon as I try to use it I get, for example:
s1_read = snappy.ProductIO.readProduct(r"Z:\free_sat_downloads\sentinel1\nb2019\GRD\florenceville_copy\S1A_IW_GRDH_1SDV_20190412T221928_20190412T221953_026763_030196_962B.nc") s1_read.getSceneRasterHeight() Traceback (most recent call last): File "<input>", line 1, in <module> AttributeError: 'NoneType' object has no attribute 'getSceneRasterHeight'
Any idea what to do next?