Pixel depth reduced after resampling

Hi,
Until last week, I was successful in exporting a resampled RGB image from SNAP with the pixel depth remaining as un integer 16 bit. But I tried the same today, following the steps> Raster>Geometric>Resampling(B2 setting), export image. And the pixel including the old images, when re run to confirm, produced the same result of 8 bit. Am l missing something or is the procedure wrong?
Thanks for the help in advance.

Please desbribe what you did exactly and with what kind of satellite product, so we can check whether it’s a bug.

Hi,
Sorry, I’m a novice in GIS. Please forgive my ignorance.
I downloaded two recent Sentinel S2A_MSIL2A and S2B_MSIL2A images.
I tried to Resample the images each using SNAP in order to use the geotiff after exporting it as an image on ArcGIS for Land Cover Study.
The steps followed on SNAP 6.0 (updated) are as below:

  1. Uploaded the .xml file of S2A image
  2. Raster>Geometric Operations> Resampling
  3. In the resampling window, selected ‘open in snap’,
    parameter settings as reference band for source: ‘B2’
  4. Open RGB image
  5. Export View as image.

Now, after these steps, usually, the geotiff file saved has a pixel depth of unsigned integer 16 and the Pyramid is level 4, resampling, Nearest neighbour.
But in this case, the Pixel depth is reduced to unsigned integer 8 bit and the Pyramid setting is level 6, resampling, Nearest neighbor.
I need the pixel depth to remain as unint 16.
What might be the issue? Could you please help.
Thanks in advance.

Thank you for the detailled description. This helps us to identify why the data is not as expected.

I first recommend to install SNAP 7.0 and to include all necessary updates.

Furthermore, there is a “S2 Resampling Operator” which is specifically designed for Sentinel-2 products. You might want to try this one because it grants correct handling of S2 data.

Lastly, it is not recommended to export the RGB via “export view as image” because it alters the quality and type of the data. Use File > Export > GeoTIFF and export all bands. You can then still display them as RGB in ArcGIS.

Dear ABraun,

Thank you for the recommendation.

I have installed the version 7, but unfortunately, the plugins fail to update with an error message, ‘Unable to connect to the Update Center’.

So I thought, I would still try to resample via ‘S2 Resampling Operator’. But it failed stating the file is too big. Will the error log help? If yes, I have posted it below.

java.lang.IllegalStateException: File size too big. TIFF file size is limited to [4294967296] bytes!
at org.esa.snap.dataio.geotiff.internal.TiffIFD.calculateStripOffsets(TiffIFD.java:410)
at org.esa.snap.dataio.geotiff.internal.TiffIFD.initEntrys(TiffIFD.java:167)
at org.esa.snap.dataio.geotiff.internal.TiffIFD.(TiffIFD.java:60)
at org.esa.snap.dataio.geotiff.internal.TiffHeader.(TiffHeader.java:48)
at org.esa.snap.dataio.geotiff.GeoTiffProductWriter.writeGeoTIFFProduct(GeoTiffProductWriter.java:91)
at org.esa.snap.dataio.geotiff.GeoTiffProductWriter.writeProductNodesImpl(GeoTiffProductWriter.java:81)
at org.esa.snap.core.dataio.AbstractProductWriter.writeProductNodes(AbstractProductWriter.java:109)
at org.esa.snap.core.dataio.ProductIO.writeProduct(ProductIO.java:400)
at org.esa.snap.rcp.actions.file.WriteProductOperation.writeProduct(WriteProductOperation.java:148)
at org.esa.snap.rcp.actions.file.WriteProductOperation.run(WriteProductOperation.java:115)
at org.netbeans.modules.progress.ui.RunOffEDTImpl$3.run(RunOffEDTImpl.java:275)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)

Much appreciated for your time and help.

My suggestion is to write the resampling to the standard BEAM DIMAP format first and then export it to GeoTIFF as a last step.

The update should work to include all necessary bug fixes.

Was successful in updating.
Maybe I’m still missing out on something. I saved it as Beam Dimap first and then exported it via File. Still not able to achieve the desired pixel on my output.