-
Notifications
You must be signed in to change notification settings - Fork 362
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add -C[cpt] arg to grdmix This will let you build an image directly from a grid and a CPT (and optionally handle intensity grid as well). * Update grdmix.c * Update grid2img.sh * Add test and PS
- Loading branch information
1 parent
fafded5
commit eadbada
Showing
4 changed files
with
105 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
outs: | ||
- md5: 59f039fd8f4375bbdb65d34bbd09d9cc.dir | ||
size: 31145 | ||
nfiles: 1 | ||
- md5: 4aa0bfc2018d514b2b1e7af6231f457f.dir | ||
size: 2345366 | ||
nfiles: 2 | ||
path: grdmix | ||
hash: md5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Testing gmt grdmix on converting a grid to an image | ||
# via a CPT w/wo shading. | ||
|
||
gmt begin grid2img ps | ||
gmt subplot begin 2x2 -Rd -Fs9c/4.5c -Scb -Srl -JQ9c -A+gwhite+p0.5p | ||
# Plain Earth relief map for comparison | ||
gmt subplot set 0 -A"Z+CPT" | ||
gmt grdimage @earth_relief_30m_p | ||
# Get intensities and plot those in gray | ||
gmt grdgradient @earth_relief_30m_p -A45 -Nte0.8 -Gint.nc | ||
gmt subplot set 1 -A"INT" | ||
gmt grdimage int.nc -Cgray | ||
# Create a tif directly from a grid and CPT | ||
gmt grdmix @earth_relief_30m_p -Cgeo -Gimg.tif | ||
gmt subplot set 2 -A"Z+CPT->TIF" | ||
gmt grdimage img.tif -fg | ||
# Throw in intensities then build tif | ||
gmt grdmix @earth_relief_30m_p -Cgeo -Iint.nc -Gimg.tif | ||
gmt subplot set 3 -A"Z+CPT+INT->TIF" | ||
gmt grdimage img.tif -fg | ||
gmt subplot end | ||
gmt end show |