Project

General

Profile

TanDEM-X CoSSC DEM generation

Added by René Mania about 4 years ago

Dear all,

I'm trying to generate a DEM from TanDEM-X CoSSC data following the demo file for ETNA (see attached). When I run line 329 (gc_map), I get an Error message that the EQA.dem1 file contains only no data values, although there is apparently elevation data included in the EQA.dem1 file. I checked it with dishgt. Could you please tell how I can solve this error?

Best regards,
René


Replies (5)

TanDEM-X CoSSC DEM generation - Added by Charles Werner about 4 years ago

Hello,
I think the issue is that the gc_map program has been replaced by a script that
calls its replacement gc_map2.
If you call the program, and have an existing EQA.dem_par and EQA.dem, delete
these files before running the gc_map program. gc_map2 extracts and interpolates
the section of the DEM that
covers the input radar image unless a segment is previously defined.

gc_map2 has a  better calculation of layover and shadow and should be used
instead of the gc_map script or gc_map1 (the original gc_map). There may be an
updated version of this
demo.

The size of the  lookup table or DEM segment may also be slightly different
using gc_map2 and that may another aspect when displaying images or caling a
program that
requires a line width such as rashgt or dis2pwr...  The lookup table has exactly
the same dimensions as the DEM segment. (EQA.dem_par in this example).

usage: gc_map2 <MLI_par> <DEM_par> <DEM> [DEM_seg_par] [DEM_seg] [lookup_table]
[lat_ovr] [lon_ovr] [ls_map] [ls_map_rdc] [inc] [res] [offnadir] [sim_sar] [u]
[v] [psi] [pix] [r_ovr] [az_dec] [mask] [frame] [ls_scaling] [DIFF_par] [ref_flg]

gc_map2 20121009.TSX_HH.rmli.par SRTM.dem_par SRTM.dem EQA.dem_par EQA.dem
EQA.20121009.lt 15.0 10.0 EQA.20121009.ls_map  -  EQA.20121009.inc  -  -
EQA.20121009.sim_sar

gc_map2 reads the input SRTM dem and extracts a section of it and oversamples
it. This DEM is defined by the text  file EQA.dem_par and the DEM data are in
EQA.dem.

you can look at the extracted dem segment using the program disdem_par that will
display a shaded relief image of the DEM on your screen.
you can also use this program to look at the input DEM SRTM.dem.

disdem_par <DEM> <DEM_par> [start] [nlines] [exaggerate] [theta0] [phi0]

gc_map2 and disdem_par both print out the DEM dimensions. The DEM segment should
be something like 2820 wide and 4230 high, but look at the DEM par

cat EQA.dem_par

geocode_back is one of the programs in the software that requires the lookup
table dimensions explicitly, so be sure to get the right values from the DEM par
of the
calculated DEM segment.

Best regards,
Charles Werner

RE: TanDEM-X CoSSC DEM generation - Added by René Mania about 4 years ago

Dear Charles,

Thank you for your feedback.

After your suggestion I used gc_map2 instead of gc_map (line 329) as follows:
cp EQA_${date}.dem_par EQA_${date}.dem_par.tmp

gc_map2 ${date}.TSX_HH.rmli.par EQA.dem_par.tmp EQA.dem1 EQA.dem_par.tmp1 tmp.dem EQA.${date}.lt2 15 10 EQA.${date}.ls_map1 - EQA.${date}.inc1 - - EQA.${date}.sim_sar1

As you can see, I created a new *dem_par.tmp file for the new EQA.dem1, and for the output I used new filenames, so there should not be any issues with existing files.

But now I get this error:

ERROR calloc_2d: memory allocation error for data values
Resampling DEM...

I have no size-problem displaying the DEM with disdem_par EQA.dem1 EQA.dem_par.tmp1, only the hillshade looks weird (see attached).

Do you know the reason that causes the error?

Best regards,
René

RE: TanDEM-X CoSSC DEM generation - Added by Charles Werner about 4 years ago

Hello,

This error indicates that you are trying to allocate a HUGE array(s).

When ever you send a request for help, please include the screen output from
running the command. That can be very helpful
in determining what the error may be.

You have oversampling factors of 10 and 15, so this can lead to a very large DEM
segment, which I think is what is happening.

Try with a smaller oversampling factor to start and see if it works.

Best regards,

Charles

RE: TanDEM-X CoSSC DEM generation - Added by René Mania about 4 years ago

Hello Charles,
Thank you for the hint on the oversampling. You were right and it worked well with 1x1 oversampling. Then I used gc_map_fine and pixel_area to create the refined look-up table.
But as you can see in the attachment, the new *gamma0 file has parallel stripes all over the scene. What could I do to get rid of these? Apart from this I was wondering whether the black areas in the image will, in the end, result in no topography at all? If that's the case, then I can stop the processing.
Best regards,
René

RE: TanDEM-X CoSSC DEM generation - Added by Cynthia Chen almost 4 years ago

Dear Charles,
I have met a similar problem of the new *gamma0 file.
I tried gc_map and gc_map2, finding that the two .ls_map files are in different geometry generated by gc_map and gc_map2, respectively. (see the attached files)
I read the related html documents. ls_map genarated by gc_map2 is in original DEM geometry, and ls_map genarated by gc_map is in original map projection. I thought these two are the same geometry. I am very confused now.
I am urgent to get correct ls_map file, to carry the next step: pixel_area. Using the result of gc_map2 makes the pix_gamma0, which is the result of pixel_area, wrong (see the attached files).
Best regards,
Helen

    (1-5/5)