Forums » GAMMA Processing » Data Import/Export »
Export of ls_map
Added by Eva Wickert almost 4 years ago
Dear all,
I used the command ls_map_mask which came apparently with a recent upgrade in 2020 to export a layover and shadow map which I produced during DEM generation with GAMMA with gc_map2. The command worked well itself, but unfortunately, I couldn't find the option for the export in geotiff format and I just obtained a not georeferenced tiff file. I'm looking therefore for a solution to obtain a georeferenced version of the ls_map. Is there maybe an alternative way, for example with data2geotiff?
I also was interested in the discussion which I read in this forum in a post about ls_map concerning also the oversampling of the ls_map (https://dep1doc.gfz-potsdam.de/boards/19/topics/401). Before exporting, should there be paid attention that one adjusts the map to a certain oversampling factor?
Best regards,
Eva
Replies (11)
Export of ls_map - Added by Charles Werner almost 4 years ago
Dear all,
- You can use the raster calculated using ls_map_mask as input to data2geotiff
to generate a GeoTIFF file.
- In case the pixel spacing of the DEM is coarser than that of the MLI and you
plan to do more than simply geocoding, you should oversample the DEM using
lat_ovr and lon_ovr to put both of them at a similar pixel spacing
- The r_ovr option is useful for the case where you have a high resolution DEM
and large, sharp height differences, such as when using a DSM: e.g. suppose you
have a LIDAR DSM, increasing r_ovr will provide more accurate layover-shadow
flags in forests or built-up areas, at the cost of a longer processing. For the
general case using coarse DEMs (SRTM / Copernicus / ...), increasing the range
oversampling will not bring anything.
Charles
Export of ls_map - Added by Charles Werner almost 4 years ago
Dear all,
- You can use the raster calculated using ls_map_mask as input to data2geotiff
to generate a GeoTIFF file.
- In case the pixel spacing of the DEM is coarser than that of the MLI and you
plan to do more than simply geocoding, you should oversample the DEM using
lat_ovr and lon_ovr to put both of them at a similar pixel spacing
- The r_ovr option is useful for the case where you have a high resolution DEM
and large, sharp height differences, such as when using a DSM: e.g. suppose you
have a LIDAR DSM, increasing r_ovr will provide more accurate layover-shadow
flags in forests or built-up areas, at the cost of a longer processing. For the
general case using coarse DEMs (SRTM / Copernicus / ...), increasing the range
oversampling will not bring anything.
Charles
RE: Export of ls_map - Added by Cynthia Chen almost 4 years ago
Dear all,
I ran gc_map2 and generated ls_map. But I do not know how to display it. I tried dispwr and disbyte, which are not appropriate for displaying ls_map. I am very confused.
Thank you so much.
Helen
RE: Export of ls_map - Added by Charles Werner almost 4 years ago
Hello Helen,
disbyte can be used for display of ls_map is in the DEM geometry (from DEM_par),
is in byte format, and has values up to 25.
Depending on the version of software,you should use visbyte.py. The latest
software release had an error dis_linear and ras_linear for unsigned byte data.
Be sure to use scale between 0 and 25.
If the layover_shadow (ls_map_rdc) map is in slant-range geometry, and has
dimensions from the MLI_par.
min_val: 0
max_val: 25
use jet.cm or gray.cm as color map. See the documentation on gc_map2
Best regards,
Charles Werner
- Display of unsigned byte data as linear amplitude ***
- Copyright 2021 Gamma Remote Sensing, v2.3 28-Jan-2021 clw/cm ***
usage visbyte.py <data> <width> [min_val] [max_val] [options]
data (input) unsigned byte data
width number of samples/line
min_val data display minimum in the range 0->255 (enter - for default: 0)
max_val data display maximum in the range 0->255 (enter - for default: 255)
-o lines lines offset (default: 0)
-l lines number of lines (default: number of lines in the file)
-r samples range offset (default: 0)
-n samples number of range samples per line (default: number of
samples/line)
-m colormap colormap, either builtin name or text format file (*.cm)
(default: rmg.cm)
NOTE: Colormap examples: hls.cm, rmg.cm, cc.cm, turbo.cm, RdBu, RdYlBu,
gray, seismic, viridis, terrain...
matplotlib builtin colormaps:
https://matplotlib.org/examples/color/colormaps_reference.html
cmocean builtin colormaps: https://matplotlib.org/cmocean
colorcet colormaps: https://colorcet.pyviz.org/user_guide/index.html
Colormaps in text format are located in $GAMMA_HOME/DISP/cmaps and
sub-directories
-b display colormap bar with scale
-d 'label' colorbar label
-g par Gamma parameter file (ISP_par, DIFF_par, DEM_par)
-z pixels window maximum dimension (pixels, width or height)
-f fontscale relative font scaling factor (default: 1.0)
-i imode interpolation mode: nearest, bilinear, bicubic, catrom,
spline16, spline36,
lanczos, sinc, hanning, kaiser, bessel, gaussian (default:
nearest)
-u image create 1 pixel/sample raster image without color bar (enter -
for default name: "data".bmp)
-p image create raster image (enter - for default name: "data".png)
NOTE: the default interpolation mode when specifying -p is
lanczos
-t set transparency for PNG format with -u option
-x display using ModestImage package (for extra-large images)
-k backend Matplotlib PyPlot backend
RE: Export of ls_map - Added by Charles Werner almost 4 years ago
Hello Helen,
disbyte can be used for display of ls_map is in the DEM geometry (from DEM_par),
is in byte format, and has values up to 25.
Depending on the version of software,you should use visbyte.py. The latest
software release had an error dis_linear and ras_linear for unsigned byte data.
Be sure to use scale between 0 and 25.
If the layover_shadow (ls_map_rdc) map is in slant-range geometry, and has
dimensions from the MLI_par.
min_val: 0
max_val: 25
use jet.cm or gray.cm as color map. See the documentation on gc_map2
Best regards,
Charles Werner
- Display of unsigned byte data as linear amplitude ***
- Copyright 2021 Gamma Remote Sensing, v2.3 28-Jan-2021 clw/cm ***
usage visbyte.py <data> <width> [min_val] [max_val] [options]
data (input) unsigned byte data
width number of samples/line
min_val data display minimum in the range 0->255 (enter - for default: 0)
max_val data display maximum in the range 0->255 (enter - for default: 255)
-o lines lines offset (default: 0)
-l lines number of lines (default: number of lines in the file)
-r samples range offset (default: 0)
-n samples number of range samples per line (default: number of
samples/line)
-m colormap colormap, either builtin name or text format file (*.cm)
(default: rmg.cm)
NOTE: Colormap examples: hls.cm, rmg.cm, cc.cm, turbo.cm, RdBu, RdYlBu,
gray, seismic, viridis, terrain...
matplotlib builtin colormaps:
https://matplotlib.org/examples/color/colormaps_reference.html
cmocean builtin colormaps: https://matplotlib.org/cmocean
colorcet colormaps: https://colorcet.pyviz.org/user_guide/index.html
Colormaps in text format are located in $GAMMA_HOME/DISP/cmaps and
sub-directories
-b display colormap bar with scale
-d 'label' colorbar label
-g par Gamma parameter file (ISP_par, DIFF_par, DEM_par)
-z pixels window maximum dimension (pixels, width or height)
-f fontscale relative font scaling factor (default: 1.0)
-i imode interpolation mode: nearest, bilinear, bicubic, catrom,
spline16, spline36,
lanczos, sinc, hanning, kaiser, bessel, gaussian (default:
nearest)
-u image create 1 pixel/sample raster image without color bar (enter -
for default name: "data".bmp)
-p image create raster image (enter - for default name: "data".png)
NOTE: the default interpolation mode when specifying -p is
lanczos
-t set transparency for PNG format with -u option
-x display using ModestImage package (for extra-large images)
-k backend Matplotlib PyPlot backend
RE: Export of ls_map - Added by Cynthia Chen almost 4 years ago
Dear Charles,
Thank you for your reply. But I don't have visbyte.py maybe because I am using GAMMA-201710. I found another way to display it. Use uchar2float to convert the format of ls_map to float, then use dispwr to display the ls_map. Is this solution suitable for the problem?
What's more, I also want to display .inc (local incidence angle map) file. I used dispwr to display it, and found that there were 'intensity' and 'db' displayed on the screen (see attached figure). I want to know which value represent the exact incidence angle?
Best regards,
Helen
RE: Export of ls_map - Added by Charles Werner almost 4 years ago
Hello,
That would be possible, disbyte will also work.
I would use dis_linear for display incidence angle or other parameters
Best regards,
Charles
RE: Export of ls_map - Added by Cynthia Chen almost 4 years ago
Dear Charles,
Very appreciate for the advice. For .inc (local incidence angle map) file, I used dis_linear to display it (dispwr also works), and found that there were 'intensity' and 'db' displayed on the screen (see attached figure). I want to know which value represent the exact incidence angle?
RE: Export of ls_map - Added by Charles Werner almost 4 years ago
Hello Helen,
The program dispwr assumes that the input is intensity, and will not display
negative numbers. That is why you should use dis_linear. If the data are image
intensity then the dB values are calculated by 10.*log_10(dn), where dn are the
data values.
New versions of the gamma software have better display tools (both C and python
based) and the ability to change the color map.
Of course you can also display these data in matlab or with Python matplotlib
using your own code. The data are in float format and are big-endian byte order,
but otherwise there are many ways to display the data, not using gamma software.
A GIS program such as qgis might also be a way to display the data.
best regards,
Charles
RE: Export of ls_map - Added by Cynthia Chen almost 4 years ago
Dear Charles,
Very appreciate for your answer and advice. I am trying the approches.
Best regards,
Helen
RE: Export of ls_map - Added by Cynthia Chen almost 4 years ago
Dear Charles,
I used gc_map2, and generated .inc and .ls_map, I used the following commands to generate .inc and .ls_map in geotiff format.
data2geotiff EQA.dem_par EQA.20181112.ls_map 5 EQA.20181112. ls_map.geo.tif
data2geotiff EQA.dem_par EQA.20181112.inc 2 EQA.20181112.inc.geo.tif
I exported them to ArcGIS, finding that they have different range (please see attached figure). .inc is bigger than .ls_map. Is that reasonable?
By the way, is there an example about using TerraSAR-X satellite data to generate a DEM?
inc&ls_map.png (299 KB) inc&ls_map.png |