Hello,
I am setting up RADARSAT-2 fully polarimetric image analysis through snappy. The first step I’m implementing is radiometric calibration. This process seems to work fine.
When trying to write the target product to BEAM-DIMAP, the following error messages are thrown :
javax.imageio.IIOException: I/O error reading image metadata!
java.lang.IllegalArgumentException: Empty region!
This only happens when more than one i-q couple is used in the calibration. Furthermore, the product saved (despite the errors) shows ~130 Mo per i or q band (which would suggest data is present), but when opened in SNAP one in two band is blank (i_HV, q_HV, i_VV, q_VV in the example below).
Does anybody know what I might be missing ?
SDB
####Simplified code :
import os
import snappy
from snappy import ProductIO
from snappy import GPF
from snappy import jpy
from snappy import ProductUtils
GPF.getDefaultInstance().getOperatorSpiRegistry().loadOperatorSpis()
HashMap = jpy.get_type(‘java.util.HashMap’)
Read source product
source_product = ProductIO.readProduct(product_path)
Radar-> Radiometric-> Calibrate
parameters = HashMap()
parameters.put(‘sourceBands’,‘i_HH,q_HH,i_HV,q_HV,i_VH,q_VH,i_VV,q_VV’)
parameters.put(‘outputImageInComplex’, True)
target_product = GPF.createProduct(‘Calibration’, parameters, source_product)
Write target product
ProductIO.writeProduct(target_product, image_name+’_cal.dim’, ‘BEAM-DIMAP’)