External DEM issue reporting

Dear SNAP developers,

I meet the run-time error while attempting to make Coregistration with assistance of an external DEM. SNAP informs of java.lang.NegativeaArraySizeException. External DEM (ArcticDEM, mosaicking Tile 48_22) totally covers the site of my research on Franz Josef Land. But the region covered by the DEM do not coincide with the region of the used SNAP product. I suppose the reason of the issue is that the DEM covers only a part of the terrain bounded by the SNAP product. Am I right? How to resolve the issue?

As far as I know, SNAP requires all external DEMs to be in WGS84 projection with geographical coordinates (lat/lon). Is this the case for your data?

Your description is a bit confusing. Does the DEM fully cover your data which is to be coregistered? I think this is a prerequesite for correct coregistration as well.

Hi pelageya,

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

The reason could probably be what @ABraun said.
You can try to make a subset of your product first. Or you extend the DEM to cover the product.

Maybe @lveci can give some hints what to do.

I move this topic also into the s1tbx category.

Hello Abraun,
Thank you so much for your answer. I use ArcticDEM external model. Mosaicking DEM tile (50 km x 50 km) covers the Island, which I would like to research, almost fully. The weight of the DEM file is about 2 Gb, resolution – 5 m. I’m afraid I would use 40 Gb DEM file to cover all the SNAP product area (250 km x 200 km in IW mode).
ArcticDEM is formatted as 32 bit GeoTIFF file with floating point elevation values. It is projected to NSIDC Sea Ice Polar Stereographic North and referenced to WGS84 horizontal datum (EPSG 3413). Vertical reference is height above the WGS84 ellipsoid. I’m not a specialist in GeoTIFF but I hope that georeferencing information (lat / lon) is automatically embedded within the file.

According to the product specifications it is not in the projection SNAP needs. (WGS 84 EPSG:4326).

I wonder why you resampled it to 5 meters while the resolution of Sentinel-1 is 10 meters only. Reducing it to 10 meters would decrease your filesize by the factor 4 and probably release some computing issues.

You can solve both issues by reprojecting it into WGS84 and set the output pixel size accordingly.

Edit: A similar topic was just opened here: Geoprojection issues

Hello Marpet,

Thank you very much. I have reproduced the error and attached the log file. Please look.
messages.log (70.6 KB)


Unfortunately, there is no error message in the log. At least nothing related to the error.
Either the error is not written at all or you have sent the file before the error was written. You could try again and close SNAP before opening the file. You can check if it looks different.

You are right. The exception isn’t written in the log file. You can see in print-screen image that the error is real. %D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5
I see in the log file 2 other errors. I don’t know if those relate to my issue:
“java.lang.IllegalArgumentException: Cannot create PyString with non-byte value”
"java.lang.UnsatisfiedLinkError: C:\Users\поля.snap\auxdata\gdal\gdal-2.1.3-win64\bin\gdal\java\gdalconstjni.dll: Can’t find dependent libraries"messages.log (79.9 KB)

The two other errors are related to a failing initialisation of GDAL. This should not affect the DEM usage.

Have you tried to reproject the DEM as @ABraun suggested?

Thank you very much, Marpet and Braun. DEM reprojection solves the problem. SNAP doesn’t message of an error.

I also encountered the same problem. Which DEM do you use? If you can, please send the website.