Hi! I’m new to python and snappy. I am trying to read all bands (not just B01) of a Sentinel 2 image and create a dictionary containing all the information (to be able to call, for example, B01 and see the array of pixel values). The final goal is to convert the dictionary into a netcdf file format. Any help will be appreciated!
Here is what I got so far:
import sys, os
sys.path.append(‘C:\Users\Me\Anaconda2\pkgs’)
os.chdir=(“D:\Sentinel2\S2A_MSIL1C_20180914T160901_N0206_R140_T16QEJ_20180914T212259\S2A_MSIL1C_20180914T160901_N0206_R140_T16QEJ_20180914T212259.SAFE\GRANULE\L1C_T16QEJ_A016868_20180914T162534\IMG_DATA”)import snappy
from snappy import ProductIO
p1 = ProductIO.readProduct(“T16QEJ_20180914T160901_B01.jp2”)