Sar-Simulation Terrain Correcton pixel spacing bug?

Hi All,

I’m encountering a difficulty in Sar-Simulation Terrain Correction, where my specified output pixel spacing is not accepted by either the ‘pixelSpacingInDegree’ or ‘pixelSpacingInMeter’ inputs. The result is that I have to accept a higher resolution (and processing time and file sizes) than I’d like. I encounter this issue both with the SNAP GUI and with snappy (example Python script below):

source= ProductIO.readProduct('')

parameters = HashMap()
target1 = GPF.createProduct("Calibration", parameters, source)

parameters = HashMap()
parameters.put('demName', "SRTM 1Sec HGT")
parameters.put('sourceBands', 'Sigma0_HV')    
target2 = GPF.createProduct('ALOS-Deskewing', parameters, target1)

# SAR-Simulation TC chain:

# Step 1
parameters = HashMap()
parameters.put('demName', 'SRTM 1Sec HGT')
parameters.put('demResamplingMethod', 'BILINEAR_INTERPOLATION')
target3 = GPF.createProduct('SAR-Simulation', parameters, target2)

# Step 2
parameters = HashMap()
parameters.put('numGCPtoGenerate', 600)
target4 = GPF.createProduct('Cross-Correlation', parameters, target3)

# Step 3
parameters = HashMap()
parameters.put('rmsThreshold', '0.5')
parameters.put('warpPolynomialOrder', '1')
parameters.put('pixelSpacingInDegree', 0.000222222222222) #THE PROBLEM INPUT
target5 = GPF.createProduct('SARSim-Terrain-Correction', parameters, target4)

ProductIO.writeProduct(target5, 'ALOS_output_file.tif', 'GeoTIFF')

In this case, the output resolution defaults to 0.000134588330100 degrees.

Some things I’ve tried:

  • The problem remains whether I specify units of meters or degrees, whether I choose a different pixel spacing, or change the map projection
  • If I use Range Doppler TC, these inputs do work, but as I’m using data from ALOS 1 this results in really poor geolocation accuracy
  • I can reduce the resolution using multi-looking. But this can’t match my desired pixel spacing.

So, I wonder if anyone can tell me, is this a bug? My understanding of SARSim-TC is superficial enough that I’m not even sure that this should work. Am I doing something wrong that’s causing this? Is there another way of achieving the same result?


I’ve now figured out that the 'pixelSpacingInDegree' option can be made to work with 'SARSim-Terrain-Correction', but only if multi-looking isn’t applied earlier in the processing chain. This doesn’t seem to be a limitation with Range-Doppler TC.

Had I properly tested my simplified example above, I might have discovered that it was already working ok… :no_mouth: