Skip to content

Commit 80fd993

Browse files
committed
Add a tutorial on Remote grids
1 parent 2e30eea commit 80fd993

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1014
-6
lines changed

Interoperability.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ the Rasters.jl package is able to keep some metadata (namely the time axis) and
144144
is not yet able to match.
145145
Here we will reproduce some of the examples from this Rasters.jl [docs](https://rafaqz.github.io/Rasters.jl/dev/#Examples-and-Plotting).
146146

147-
\begin{examplefig}{}
148147
```julia
149148
using GMT
150149
using Rasters, RasterDataSources, ArchGDAL
@@ -153,7 +152,10 @@ ENV["RASTERDATASOURCES_PATH"] = tempdir();
153152
A = Raster(WorldClim{BioClim}, 5);
154153
viz(A, colorbar=true)
155154
```
156-
\end{examplefig}
155+
156+
~~~
157+
<img src="/assets/world_clim_bio_clim.png" width=80% class="center"/>
158+
~~~
157159

158160
\begin{examplefig}{}
159161
```julia

_assets/world_clim_bio_clim.png

176 KB
Loading

documentation/utilities/remotegrid.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ Parameters
2323

2424
- `name`: The grid name. One of:
2525

26-
- `earth_age`, `earth_geoid`, `earth_mag`, `earth_gebco`, `earth_gebcosi`, `earth_mask`, `earth_dist`, `earth_faa`, `earth_edefl`, `earth_ndefl`, `earth_mss`, `earth_mdt`, `earth_relief`, `earth_synbath`, `earth_vgg`, `earth_wdmam`, `earth_day`, `earth_night`,
26+
- `earth_age`, `earth_geoid`, `earth_mag`, `earth_gebco`, `earth_gebcosi`, `earth_mask`, `earth_dist`, `earth_faa`, `earth_faaerror`, `earth_edefl`, `earth_ndefl`, `earth_mss`, `earth_mdt`, `earth_relief`, `earth_synbath`, `earth_vgg`, `earth_wdmam`, `earth_day`, `earth_night`,
2727
- `mars_relief`, `mercury_relief`, `moon_relief`, `pluto_relief`, `venus_relief`.
2828

2929
Keyword Arguments
3030
-----------------
3131

3232
- `rest_p` or `res`: Grid resolution. One of "01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m" or higher
3333
for the grids that have finer resolution. Use the `info` option to inquiry all available resolutions of a grid.
34+
The suffix ``d``, ``m``, and ``s`` stand for arc-degrees, arc-minutes, and arc-seconds, respectively.
3435

35-
- `reg`: Grid registration. Choose between 'g'rid or 'p'ixel registration or leave blank modules picking the best one.
36+
- `reg`: Grid registration. Choose between 'g'rid or 'p'ixel registration or leave blank for modules to picking the indicated one.
37+
By default, a gridline-registered grid is selected unless only the pixel-registered grid is available.
3638

3739
- `info`: Print grid information (true) or just the full grid name (false). Cannot be used with the option `res`.
3840

@@ -62,7 +64,7 @@ See a region over Oman of the "earth_relief" at "15s" resolution
6264
```julia
6365
using GMT
6466

65-
G = gmtread(remotegrid("earth_relief", res="15s"), region=(55,60,23,28))
67+
G = grdcut(remotegrid("earth_relief", res="15s"), region=(55,60,23,28))
6668
viz(G, proj=:guess, shade=true, coast=true, colorbar=true)
6769
```
6870
\end{examplefig}

tutorials.md

+11
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,15 @@
122122
~~~</a>~~~
123123
@@
124124

125+
@@box
126+
~~~<a class="boxlink" href="remote_datasets/remote_datasets/">~~~
127+
@@title Remote Grids@@
128+
@@box-content
129+
~~~
130+
<img src="/tutorials/remote_datasets/tilelogo.jpg">
131+
~~~
132+
@@
133+
~~~</a>~~~
134+
@@
135+
125136
@@

tutorials/blender_shading/blender_rt.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Load the gray scale image and show it:
3737
using GMT
3838

3939
Iblend = gmtread("https://oceania.generic-mapping-tools.org/cache/wiberia_shade_blender.png");
40-
viz(Iblend, coast=true)
40+
viz(Iblend)
4141
```
4242
\end{examplefig}
4343

tutorials/remote_datasets.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# GMT Remote Datasets
2+
3+
{{list_folder_with_images remote_datasets}}

tutorials/remote_datasets/age/age.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Seafloor Crustal Age
2+
3+
\begin{examplefig}{}
4+
```julia
5+
using GMT # hide
6+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_age.jpg?raw=true"); # hide
7+
viz(I) # hide
8+
```
9+
\end{examplefig}
10+
11+
12+
The available resolutions for this grid are:
13+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"`. Where
14+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
15+
of \myreflink{remotegrid} for information about the grid registrations.
16+
17+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
18+
the grid(s) are loaded from that local directory.
19+
20+
The default color palette table (CPT) for this dataset is _earth_age.cpt_. It’s implicitly used when passing in the
21+
file name of the dataset to any grid plotting method if no CPT is explicitly specified.
22+
23+
Refer to [earth_age](https://www.generic-mapping-tools.org/remote-datasets/earth-age.html) for more details
24+
about technical detail, available resolutions, sizes, version information and references.
25+
26+
### Example
27+
28+
```julia
29+
G = gmtread(remotegrid("age", res="6m"))
30+
viz(G, shade=true)
31+
```
11.4 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# NASA Earth Day/Night Images
2+
3+
4+
\begin{examplefig}{}
5+
```julia
6+
using GMT # hide
7+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_daynight.jpg?raw=true"); # hide
8+
viz(I) # hide
9+
```
10+
\end{examplefig}
11+
12+
We serve two NASA image products: The Blue and Black marble mosaics. We have filtered and down-ampled those as
13+
well at the same resolutions that are available for the Earth DEMs. However, all images are pixel-registered only.
14+
15+
The available resolutions for this image are:
16+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m", "30s"`. Where
17+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
18+
of \myreflink{remotegrid} for information about the grid registrations.
19+
20+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
21+
the image(s) are loaded from that local directory.
22+
23+
Refer to [earth_daynight](https://www.generic-mapping-tools.org/remote-datasets/earth-daynight.html) for more details
24+
about technical detail, available resolutions, sizes, version information and references.
25+
26+
### Example
27+
28+
```julia
29+
I = gmtread(remotegrid("day", res="6m"))
30+
viz(I)
31+
```
32+
33+
or for the night images
34+
35+
```julia
36+
I = gmtread(remotegrid("night", res="6m"))
37+
viz(I)
38+
```
10.4 KB
Loading
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# GSHHG Earth Distace to Shoreline
2+
3+
\begin{examplefig}{}
4+
```julia
5+
using GMT # hide
6+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_dist.jpg?raw=true"); # hide
7+
viz(I) # hide
8+
```
9+
\end{examplefig}
10+
11+
The available resolutions for this grid are:
12+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"`. Where
13+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
14+
of \myreflink{remotegrid} for information about the grid registrations.
15+
16+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
17+
the grid(s) are loaded from that local directory.
18+
19+
The default color palette table (CPT) for this dataset is _earth_dist.cpt_. It’s implicitly used when passing in the
20+
file name of the dataset to any grid plotting method if no CPT is explicitly specified.
21+
22+
Refer to [earth_dist](https://www.generic-mapping-tools.org/remote-datasets/earth-dist.html) for more details
23+
about technical detail, available resolutions, sizes, version information and references.
24+
25+
### Example
26+
27+
```julia
28+
G = gmtread(remotegrid("dist", res="6m"))
29+
viz(G, shade=true)
30+
```
9.17 KB
Loading
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# IGPP Earth West-East Defections
2+
3+
\begin{examplefig}{}
4+
```julia
5+
using GMT # hide
6+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_edefl.jpg?raw=true"); # hide
7+
viz(I) # hide
8+
```
9+
\end{examplefig}
10+
11+
The available resolutions for this grid are:
12+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"`. Where
13+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
14+
of \myreflink{remotegrid} for information about the grid registrations.
15+
16+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
17+
the grid(s) are loaded from that local directory.
18+
19+
The default color palette table (CPT) for this dataset is _earth_defl.cpt_. It’s implicitly used when passing in the
20+
file name of the dataset to any grid plotting method if no CPT is explicitly specified.
21+
22+
Refer to [earth_edefl](https://www.generic-mapping-tools.org/remote-datasets/earth-edefl.html) for more details
23+
about technical detail, available resolutions, sizes, version information and references.
24+
25+
### Example
26+
27+
```julia
28+
G = gmtread(remotegrid("edefl", res="6m"))
29+
viz(G, shade=true)
30+
```
14.9 KB
Loading

tutorials/remote_datasets/faa/faa.md

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# IGPP Earth Free-Air Anomaly
2+
3+
4+
\begin{examplefig}{}
5+
```julia
6+
using GMT # hide
7+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_faa.jpg?raw=true"); # hide
8+
viz(I) # hide
9+
```
10+
\end{examplefig}
11+
12+
The available resolutions for this grid are:
13+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"`. Where
14+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
15+
of \myreflink{remotegrid} for information about the grid registrations.
16+
17+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
18+
the grid(s) are loaded from that local directory.
19+
20+
The default color palette table (CPT) for this dataset is _earth_faa.cpt_. It’s implicitly used when passing in the
21+
file name of the dataset to any grid plotting method if no CPT is explicitly specified.
22+
23+
Refer to [earth_faa](https://www.generic-mapping-tools.org/remote-datasets/earth-faa.html) for more details
24+
about technical detail, available resolutions, sizes, version information and references.
25+
26+
### Example
27+
28+
```julia
29+
G = gmtread(remotegrid("faa", res="6m"))
30+
viz(G, shade=true)
31+
```
17 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# IGPP Earth Free-Air Anomaly Error
2+
3+
4+
\begin{examplefig}{}
5+
```julia
6+
using GMT # hide
7+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_faaerror.jpg?raw=true"); # hide
8+
viz(I) # hide
9+
```
10+
\end{examplefig}
11+
12+
The available resolutions for this grid are:
13+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"`. Where
14+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
15+
of \myreflink{remotegrid} for information about the grid registrations.
16+
17+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
18+
the grid(s) are loaded from that local directory.
19+
20+
Refer to [earth_faaerror](https://www.generic-mapping-tools.org/remote-datasets/earth-faaerror.html) for more details
21+
about technical detail, available resolutions, sizes, version information and references.
22+
23+
### Example
24+
25+
```julia
26+
G = gmtread(remotegrid("faaerror", res="6m"))
27+
viz(G, shade=true)
28+
```
13.2 KB
Loading
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# GEBCO Earth Relief
2+
3+
4+
\begin{examplefig}{}
5+
```julia
6+
using GMT # hide
7+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_gebco.jpg?raw=true"); # hide
8+
viz(I) # hide
9+
```
10+
\end{examplefig}
11+
12+
This grid only contains observed relief and inferred relief via altimetric gravity. You access these grids
13+
by specifying their names (`earth_gebco`, or just `gebco`, `gebcosi` and `synbath`) and resolution.
14+
15+
The available resolutions for these group of grids are:
16+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m", "30s", "15s", "03s", "01s"`. Where
17+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
18+
of \myreflink{remotegrid} for information about the grid registrations.
19+
20+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
21+
the grid(s) are loaded from that local directory.
22+
23+
The default color palette table (CPT) for this dataset is _geo.cpt_. It’s implicitly used when passing in the
24+
file name of the dataset to any grid plotting method if no CPT is explicitly specified.
25+
26+
Refer to [earth_gebco](https://www.generic-mapping-tools.org/remote-datasets/earth-gebco.html) for more details
27+
about technical detail, available resolutions, sizes, version information and references.
28+
29+
### Examples
30+
31+
```julia
32+
G = gmtread(remotegrid("gebco", res="10m"))
33+
viz(G, shade=true)
34+
```
35+
36+
Grids with resolutions higher than `06m` are tilled to avoid download the entire dataset, which can be **very** big,
37+
when only a sub-region is needed. For example, this downloads a sub-region of the `1m` (one arc-minute) and visualizes it.
38+
39+
```julia
40+
G = grdcut(remotegrid("gebco", res="1m"), region=(0,10,40, 50))
41+
viz(G, shade=true)
42+
```
43+
17.6 KB
Loading
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EGM2008 Earth Geoid
2+
3+
\begin{examplefig}{}
4+
```julia
5+
using GMT # hide
6+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_geoid.jpg?raw=true"); # hide
7+
viz(I) # hide
8+
```
9+
\end{examplefig}
10+
11+
Load the EGM2008 Earth geoid dataset in various resolutions.
12+
13+
The available resolutions for this grid are:
14+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m", "01m"`. Where
15+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
16+
of \myreflink{remotegrid} for information about the grid registrations.
17+
18+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
19+
the grid(s) are loaded from that local directory.
20+
21+
Refer to [earth_geoid](https://www.generic-mapping-tools.org/remote-datasets/earth-geoid.html) for more details
22+
about technical detail, available resolutions, sizes, version information and references.
23+
24+
### Example
25+
26+
```julia
27+
G = gmtread(remotegrid("geoid", res="6m"))
28+
viz(G, shade=true)
29+
```
15 KB
Loading

tutorials/remote_datasets/mag/mag.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Earth Magnetic Anomaly Model (EMAG2)
2+
3+
\begin{examplefig}{}
4+
```julia
5+
using GMT # hide
6+
I = gdalread("https://github.com/GenericMappingTools/remote-datasets/blob/main/docs/_static/GMT_earth_mag.jpg?raw=true"); # hide
7+
viz(I) # hide
8+
```
9+
\end{examplefig}
10+
11+
The US National Environmental Information Center Office of Geomatics provide EMAG2, the Earth Magnetic Anomaly Model
12+
at 2 arc-minute resolution based on satellite, ship, and airborne magnetic measurements.
13+
14+
The available resolutions for this grid are:
15+
- `"01d", "30m", "20m", "15m", "10m", "06m", "05m", "04m", "03m", "02m"`. Where
16+
the suffix `d`, `m` and `s` stand for arc-degrees, arc-minutes, and arc-seconds. See also the manual
17+
of \myreflink{remotegrid} for information about the grid registrations.
18+
19+
On first usage, the grids are downloaded to the user `./gmt/server/...` directory. On later usages,
20+
the grid(s) are loaded from that local directory.
21+
22+
The default color palette table (CPT) for this dataset is _earth_mag.cpt_. It’s implicitly used when passing in the
23+
file name of the dataset to any grid plotting method if no CPT is explicitly specified.
24+
25+
Refer to [earth_mag](https://www.generic-mapping-tools.org/remote-datasets/earth-mag.html) for more details
26+
about technical detail, available resolutions, sizes, version information and references.
27+
28+
### Example
29+
30+
```julia
31+
G = gmtread(remotegrid("mag", res="6m"))
32+
viz(G, shade=true)
33+
```
13.6 KB
Loading

0 commit comments

Comments
 (0)