Is Overly of multiple grdview supported?

Is it possible to overly multiple grdview on top of each to achieve same results presented in the attachments?

All I did was grdview the DEM vertically exaggerated using -JZ3.5 and drap an Arial imagery of it. However, I couldn’t replicate coloring of the sub-region of the DEM as shown in the attachments.

At first I thought I grdview DEM drapped and add second DEM with coloring and they would overlap automatically but it didn’t. So, Is any possible solution to achieve such feat in GMT/GMT wrappers.

Hello @aminevsaziz, I’m not sure I completely understand what you are trying to achieve:

  • If you want to color the DEM with a color palette table (CPT) and have hill shading/artificial lighting have a look at grdimage options -C and -I+d.

  • If you actually want to drape an image over a DEM have a look at example 32 in the Illustration Gallery.

I want all of the three at once @KristofKoch . Let’s say I have DEM of 3x3 km I want the following:

1.Color only a small region of the DEM 1x1km (as illustrated by red circle in the figure)

2.drap an Arial image of tif format on the 3x3km DEM.

  1. Merge step 1 and step 2 mix on top of the vertically exaggerated DEM of 3x3.

Expected results:
DEM exaggerated with Arial drapped texture and small subset of 1x1km are the part where cpt color is applied.

Thank you for your clarification. Rough idea without any validation of feasibility:

  • plot your aerial imagery without any perspective or lighting
  • plot your CPT coloured DEM in the same projection as the plot above
  • clip the CPT coloured plot as desired and bake with the aerial imagery plot
  • drape resulting plot over DEM and add perspective/shading as desired
1 Like

@KristofKoch thank you, but by ploting you mean grdimage ?Also clipping using what exactly grdcut?

@KristofKoch I attached sample files +demo script based on your suggestions but I’m not sure if it’s correct. Any help @Joaquim?

    gmt begin
        # clip a subet of the dem
        gmt grdcut origin.grd -R$bbox -Gsubset.grd
        # generate intensity as suggested
        gmt grdgradient origin.grd -Nt0.5 -A45 -Gintens.grd
        # for cpt we will use -Cgeo
        gmt grdimage subset.grd -Jm25c -Cgeo -R$bbox 
        gmt grdimage image.png -Jm25c -R$bbox 
        gmt grdview origin.grd -JM25c -JZ1.5c -R$bbox -Qi72i -p-130/30 -Cgeo -Gimage.png
    gmt end

I don’t know if GMT can do it without external help. If image’s transparency in the form of an alpha layer is respected you could make a hole in the Aerial image by setting it to full transparency in the hole. Than you’d drape it on top of the colored and shaded illuminated DEM and expect to see the color inside the hole.
If this doesn’t work, you’ll have to do the mix Aerial->hole->color illuminated terrain in a separate step (maybe grdmix and psclip can help) and drape this reworked image on the terrain.