Comments (11)
Yes, but (as Yvonne said on the post) how GMT would know at what z value should paint the NaN? At the bottom of the 3D block? at the top? in the middle? So, the modifier must include a z value.
from gmt.
from gmt.
As I understand, grdview
works with two grids: reliefgrid
(sets the shape) and drapregrid
(sets the colors).
We can set the color of NaN for the drapregrid
. This is easy.
But we also need a value for the reliefgrid
. I think this is why grdview
can't paint the NaN nodes.
from gmt.
HM, OK there are several issues with grdview that we have addressed in grdview so now there are differences in syntax, docs, and maybe internal operations. Back from GMT4 we used to allow grdimage to accept three grids (red.grd, green.grd, blue.grd). We still do so under the hood but usage and documentation only discusses single grid and single image (grid | image). In fact, grdimage handles those 3 grids as three consecutive files given on input. This differs in grdview.
In grdview.c we list the single relief grid but under -G for drape grid we still list the option for three grids (-Gdrapegrid | -Gred.grd -Ggreen.grd -Bblue.grd). So here, -G is repeated 3 times. This all looks ugly to me. Apart from the NaN-color issue, I think grdview needs to modernise its documentation and usage and hide this ugliness but accept it via backwards compatibility. Our preferred way of images is passing an RGB image, not 3 grids from an era before @joa-quim worked to include images. We might even consider a GMT_Call_Module to grdmix if we get 3 color grids and return the image.
In the presence of draping, the relief grid just provides geometry/shape and there is nothing to paint. COlor is determined by the draping and that grid may have NaNs to be coloured or it is an image. grdimage image has many ways to handle NaN color - not sure if we want to replicate all that in grdview.
I think I may want to work on a PR that fixes the oldfashinoned -Gred -Ggreen -Gblue syntax first.
from gmt.
BTW, I just post in the forum a way to do it (that maybe is clearer).
from gmt.
I think @joa-quim might recall we had a rgb2grd module a long time ago? So that is how people made those 3 grids. Better to expect -Ggrid|image and leave some stuff under the hood in case someone runs an old script with three -G drape grids.
from gmt.
Also @joa-quim you added this in the grdview parser:
case 'z': /* One image. This is an undocumented fake option but one that lets externals pass both images and grids for draping. */
We will see but perhaps there wont be a need for this once -Gimage works, but no biggie.
from gmt.
What do you think is grdview
would work (under the hood) as my script? It creates a 2D image and then drop it over the relief. This is simpler to do (I suspect) and would have the advantage that we grdview won't plot things that should be hidden by the relief (that could happened in more complex figures).
from gmt.
Sorry, a bit early to know - I am in the middle of stuff. Not quite sure of what you are asking.
from gmt.
Also @joa-quim you added this in the grdview parser:
case 'z': /* One image. This is an undocumented fake option but one that lets externals pass both images and grids for draping. */
We will see but perhaps there wont be a need for this once -Gimage works, but no biggie.
Hmm, I'm not finding any use of that hidden case z:
in GMT.jl
from gmt.
Hmm, I'm not finding any use of that hidden
case z:
in GMT.jl
Think we can remove it. We learn that one image is passed and that is all that is needed I think.
from gmt.
Related Issues (20)
- ps-insar deformation mapping using xyz2grd HOT 3
- Link Checker Report on 2024-01-21 HOT 1
- Let Movie create the master frame even if it has the -A parameter HOT 4
- Get last frame (-Ml) when a title sequence is used (-E) in movie HOT 1
- Modifier +e detected but not a valid modifier! - ignored in gmt movie -A+e? HOT 1
- Warning messagge with text via gmt events -Et HOT 5
- Link Checker Report on 2024-01-28
- grdmask with region '-Rg' not recognising longitudes more than 180 HOT 1
- Colorbar: Size of side triangles affects size of NaN box HOT 4
- test/inset/inset-l2s.sh fails HOT 2
- test/grdcut/vert_cube_cuts.sh fails in macOS/Windows CI HOT 1
- Link Checker Report on 2024-02-04 HOT 1
- Specifying nearneighbor -S, unit not understood? HOT 12
- grdinterpolate generates one layer too much when reading the cube.nc test file
- Link Checker Report on 2024-02-11
- False "Option -XXXX given more than once" HOT 2
- Forum down? HOT 1
- Link Checker Report on 2024-02-18
- Problem clipping with -E*dcw*+c HOT 6
- Cleaning old feature requests HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gmt.