Hello,
I have just tested the Sen2Cor with snappy, I have currently Sen2Cor 2.3.1 and SNAP 6.0 beta. For me it works, please find the code:
import datetime
import numpy
from snappy import ProductData
from snappy import GPF
from snappy import HashMap
def readProduct(path, formatName=None):
from snappy import (File, ProductIO)
productFile = File(path)
if formatName is None:
return ProductIO.readProduct(productFile)
else:
reader = ProductIO.getProductReader(formatName)
return reader.readProductNodes(productFile, None)
parameters = HashMap()
parameters.put(‘resolution’, “20”)
L2A_image = GPF.createProduct(‘Sen2Cor’, parameters, readProduct(“D:\temp\a.jp2”))
Let me know if you have any problems with this code.