Extract Incidence Angle Tie-Point Grid to 2d array/geotiff?

Hello,

I am currently defining a method to ingest S1A EW GRD products from high latitudes (between 65 and 90N) and output projected (epsg:3413) geotiffs in byte format for further analysis and mosaic generation. I tried using GPT scripting but I was running into issues with large areas of extra NoData being produced when reprojecting (something to do with being at latitudes >65?), and general slow processing times compared to other tools (e.g. 30-60 seconds using GPT compared to 5-20 seconds using GDAL 2.0.0).

For reference, my graph thus far consists of Input S1A .zip -> Calibration(sigma0) -> Ellips.Corr.RD(project to 200m epsg:3413) -> Convert Datatype (byte) -> Write to Geotiff. Regardless of whether I use GPT or GDAL, I also run a quick gdal_translate to LZW compress and tile the processed geotiffs.

With all that said, my main problem with both GPT and GDAL is that the output images do not appear to be balanced/calibrated for incidence angle, making them unsuitable for mosaicking. Thus I would like to be able to dump the incidence angle grid to some file or in-memory array so that I may use it to balance the pixel values outside of the SNAP environment. I realize that I can use BandMath within SNAP/GPT, but I’d like to test with alternatives rather than be locked into using a single method.

I would very much like to see an answer to this thread, as it is essentially what I’m looking for.

Thanks

The calibration LUT is intended for land applications. This is why over ocean or ice it doesn’t correct it as well.
Once you have the incidence angle how do you intend to apply a correction?

You can export the incidence angle with bandmaths as you said. An alternative would to read the metadata and retrieve the min and max for an azimuth line. From this you can calculate the linear gradient.

Thanks Luis.

Good point clarifying the calibration tip. I have always calibrated so it was just a muscle memory of sorts :slight_smile: I’ll try some runs with and without to see if I can skip that step (and shorten the processing time).

I will look into exporting from metadata. Should just be a matter of sifting through the manifest, unless I’m missing something?

Appreciate the quick response.

If you are looking at the dimap files, it’s in the abstracted metadata
element of .dim xml file.
If you are reading the S1 products directly, it will be in the
annotation xml files not the manifest.

Got it. Thanks again!

Hi Iveci,

I have a question on how to retrieve the incidence angles (and the elevation angle and slant range time) from the annotation metadata file(s). I would like to make a 2D grid of the angles an slant range time. I intuitively think to loop through the “antennaPattern” elements (bursts?) for each swath (ie. IW1, IW2 and IW3) and merge the various parameters together and interpolate them to pixel resolution, but I don’t see how to do this in practice… Am I on the right track?

Hi evgyrt,
I have the same question. I was wondering if you had been able to retrieve the incidence angles yet?

Thanks!

Hi,

The way I ended up doing it is to make use of the elements in the annotation .xml. The geolocationGridPoints are arranged in a 2D grid in terms of lines and pixels. Then, I interpolate up to the actual resolution. Let me know if you have any comments or another solution to the problem.

/Trygve