The Leland texture illumination (again)

Continuing from and be patient because the texture shading calculation is not a fast thing.
(see more at this GMT.jl tutorial)

using GMT

G = gmtread("@earth_relief_01s", region=(-114.14,-111.28,35.50,37.06));
lelandshade(G, color=true, colorbar=true, fmt=:jpg, show=true)

2 Likes

Beautiful!

Amazing @Joaquim!
I’m a Julia beginner… I wonder how to install lelandshade on Julia!

Good reminding. It’s still in GMT.jl master. I’ll commit some other changes and release a new version. Should be ready in one or two hours. (do a ] up then and it should be ready to use).

Waiting for that!
Amazing job!

1 Like

GMT.jl 1.5.0 is now the current version. The above example should work, but given the recent issue I don’t know if you don’t have to use another grid.

It works perfectly!
Now I’d like to use another colarbar instead of the topo one.
Here’s what I’ve done, but I can’t get a promising result:

using GMT
G = gmtread("@earth_relief_01s", region=(-11.8,-11.1,20.8,21.5));
topo = makecpt(color=:batlowK, range=(270,630,20), continuous=true);
lelandshade(G, color=topo, colorbar=true, fmt=:jpg, show=true)

Sorry, a non tested case and a little bug. Will be fixed on master but meanwhile the workaround is to replace the default cpt in the G (GMTgrid) object. That is, do

G.cpt = "batlowK";

and repeat the lelandshade(G, color=true, colorbar=true, fmt=:jpg, show=true) command.

Interesting!
By the way, if i’d like to save it, it seems that fname is not working.
Also, if I’d like to add some faults on top of my topography and an inset map is it possible?
Nice effort.

The name is always a tricky guy in wrapper functions that call other modules inside. Although it would be nice that it works (and it will) with show=true, this options was more intended to for quick views. To do more complex maps don’t use show and it will return a GMTimage object (this is documented) that your can use in other modules. e.g.

I = lelandshade(...)
grdimage(I, ...)
plot!(...)

or even

I = lelandshade(...)
viz(I, name=..., plot(data=...,))