“/by zero error” occurs in Terrain-correction(EPSG:4326)

Dear all
I am working with S1 GRD images, but I got error message when I set Terrain-correction’s Map Projection in EPSG:4326.

“/by zero error” shows when I do Terrain-correction (EPSG:4326),
I know there is a already a similar discussion on the forum
by-zero-error-and-sarsim-terrain-correction-error-during-graph-building
but the discussion stop in thomakra’s post:
However, it works if I specify the mapProjection string as:
GEOGCS[“WGS84(DD)”,
DATUM[“WGS84”,
SPHEROID[“WGS84”, 6378137.0, 298.257223563]],
PRIMEM[“Greenwich”, 0.0],
UNIT[“degree”, 0.017453292519943295],
AXIS[“Geodetic longitude”, EAST],
AXIS[“Geodetic latitude”, NORTH]]

So …
Can EPSG:4326 work correctly in Terrain-correction ?
or
Is there any difference between WGS(DD) and EPSG:4326

MY IMAGE: Subset SA1_IW_GRDH_1SDV
MY WORKFLOW: Read -> Calibration -> Terrain-Correction -> Write

WGS(DD) and EPSG:4326 are the same, and WGS84(DD) should actually work with any SAR product. Which steps were applied before?

which steps?
Regardless of what steps I used before, it always got the “\by zero” error When I change the map projection to “EPSG:4326”,
In this post, I only test “EPSG: 4326” by following the steps below
Calibration -> Terrain-Correction -> Write

Have you tried a different image resampling method?

I just tested
NEAREST_NEIGHBOUR
BILINEAR INTERPOLATION
CUBIC_CONVOLUTION
BISINC_5_POINT_INTERPOLATION
BISINC_11_POINT_INTERPOLATION
BISINC_21_POINT_INTERPOLATION
BICUBIC_INTERPOLATION

All failed…

according to this post (Aggregation and Interpolation of Sentinel products - should I use snappy or GDAL tools?) it is related to the digital elevation model. Which one are you using and where is your study area?

Dear ABraun
My study area is in Taiwan,

I have tried SRTM 3Sec, SRTM 1Sec HGT and External DEM(20mDEM get from Naional Web) before. All of them can work normally in WGS84(DD).

I compare the GPF_Parameter_Files(XML) that create from SNAP Graph Builder with forum suggestions you provide.
Only “pixelSpacingInMeter” is different

But I wonder why I need to set “pixelSpacingInMeter” to 0.0 ?
Is that correct?

Finally, even if I set pixelSpacingInMeter in the xml file to 0
Still appearing Error:/by zero

I’m out of ideas :frowning:
10 meters makes more sense to me actually.

Hello, I’m sorry to hear that you have stumbled about this problem.
Can you reproduce this error and attach the log file here.
I hope that I can see the stack trace, to identify where this error occurs.

You can find the log file by selecting from the menu Help / Show Log Directory. Make sure to reproduce the error first and then attach the messages.log file.

Thanks

Dear marpet
Thanks for your help!
messages.log (77.1 KB)

Thanks for the log file.

Could you have a look at the output product of the calibration step?
Is it of zero size, maybe? The error happens at a location in the code where I wouldn’t expect it. Maybe something is wrong with the input of the Terrain-Correction.

This time I do it step by step

  1. GRD->[calibration] -> Cal_product
  2. Cal_product->[Terrain-Correction]->Cal_TC_product

Cal_product looks fine…
But it still shows error message at second step:Terrain Correction(EPSG:4326)

messages.log (83.6 KB)