Hi,
I am trying to make snappy running in my python 3.6 environment. I installed jpy 8.0 by myself and trying to run your sample code
import sys
sys.path.append(r'C:\Users\abc\.snap\snap-python\snappy')
from snappy import ProductIO
import numpy as np
import matplotlib.pyplot as plt
p = ProductIO.readProduct(r'C:\Users\abc\.snap\snap-python\snappy\testdata\MER_FRS_L1B_SUBSET.dim')
rad13 = p.getBand('radiance_13')
w = rad13.getRasterWidth()
h = rad13.getRasterHeight()
rad13_data = np.zeros(w * h, np.float32)
rad13.readPixels(0, 0, w, h, rad13_data)
p.dispose()
rad13_data.shape = h, w
imgplot = plt.imshow(rad13_data)
imgplot.write_png('radiance_13.png')
An exeception thrown out when doing “readProduct” step. RuntimeError: java.lang.IllegalArgumentException: org.geotools.styling.StyleFactory is not an ImageIO SPI class
Anyone has any idea how to solve this? The code is totally fine if I change to Python 3.4.