Skip to content

Commit c5ad7ef

Browse files
committed
Add DGT Lidar tutorial in portuguese
1 parent ab43f7c commit c5ad7ef

8 files changed

Lines changed: 522 additions & 14 deletions

File tree

_extensions/gmtref/gmtref.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ return {
2424
local utilities = {
2525
"ablines", "anaglyph", "append2fig", "autocov", "autocor", "blendimg", "cart2pol", "cart2sph",
2626
"coastlinesproj", "colorzones", "cpt4dcw", "crop", "cube", "cubeplot", "cylinder",
27-
"date2doy", "delrows", "df2ds", "dodecahedron", "doy2date", "ecmwf", "ellipse3D",
27+
"date2doy", "delrows", "df2ds", "dgt_lidar", "dgt_mosaic", "dodecahedron", "doy2date", "ecmwf", "ellipse3D",
2828
"era5time", "era5vars", "extrude", "findpeaks", "flatfv", "fv2fv",
2929
"gadm", "geocoder", "geodetic2enu", "getbyattrib", "gmtread", "gmtwrite", "graticules",
3030
"grid2tri", "gridit", "gunique", "hampel", "hlines", "icosahedron",

_quarto.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,8 @@ project:
586586
- tutorials/Landsat8/histogram_stretch.qmd
587587
- tutorials/longest_sail/longestsail.qmd
588588
- tutorials/mosaics/mosaics.qmd
589-
- tutorials/dgt_lidar/dgt_lidar.qmd
589+
- tutorials/dgt_lidar/tut_dgt_lidar.qmd
590+
- tutorials/dgt_lidar/tut_dgt_lidar_pt.qmd
590591
- tutorials/remote_datasets/remote_datasets.qmd
591592
- tutorials/signal/signal.qmd
592593
- tutorials/signal/autocorr_chloro/autocorr_chloro.qmd
@@ -792,7 +793,7 @@ website:
792793
- text: "Mosaics"
793794
file: tutorials/mosaics/mosaics.html
794795
- text: "DGT LIDAR Portugal"
795-
file: tutorials/dgt_lidar/dgt_lidar.html
796+
file: tutorials/dgt_lidar/tut_dgt_lidar_pt.html
796797
- text: "Insets"
797798
file: tutorials/insets/insets.html
798799
- text: "Remote Grids"

documentation/modules/gravprisms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ gravity gradient anomalies, or geoid anomalies. Options are available to control
2525
axes units and direction.
2626

2727
~~~
28-
<img src="/assets/GMT_seamount_prisms.png" alt="Simple" width="500" class="center"/>
28+
<img src="/assets/GMT_seamount_prisms.png" alt="Simple" width="600" class="center"/>
2929
~~~
3030

3131
Three density models modeled by prisms for a truncated Gaussian seamount via **C**: (left) Constant

documentation/utilities/dgt_lidar.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ using GMT, HTTP
164164
dgt_lidar(-7.607, 40.322; neighbors=1, mosaic="estrela.tiff")
165165
```
166166

167-
For a complete worked example see the [DGT LIDAR tutorial](../../tutorials/dgt_lidar/dgt_lidar.qmd).
167+
For a complete worked example see the [DGT LIDAR tutorial](../../tutorials/dgt_lidar/tut_dgt_lidar_pt.qmd).
168168

169169
```{julia}
170170
#| echo: false

documentation/utilities/dgt_mosaic.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,4 @@ See Also
101101

102102
{{< gmtref dgt_lidar >}}, {{< gmtref mosaic >}}
103103

104-
For a complete worked example see the [DGT LIDAR tutorial](../../tutorials/dgt_lidar/dgt_lidar.qmd).
104+
For a complete worked example see the [DGT LIDAR tutorial](../../tutorials/dgt_lidar/tut_dgt_lidar_pt.qmd).

documentation/utilities/mat2img.qmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ If `stretch` is a scalar, scale the values > `stretch` to [0 255]
2727
The `kw...` kwargs search for [:layout :mem_layout], [:names] and [:metadata]
2828

2929

30-
See Also
31-
--------
32-
33-
{{< gmtref mat2ds >}}, {{< gmtref mat2grid >}}
34-
3530
```{julia}
3631
#| echo: false
3732
#| output: asis
3833
using GMT
3934
GMT.doc_source_links("mat2img")
4035
```
36+
37+
See Also
38+
--------
39+
40+
{{< gmtref mat2ds >}}, {{< gmtref mat2grid >}}
Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ provides free high-resolution LIDAR-derived elevation data covering the entire P
55
through its [Collaborative Data Distribution (CDD)](https://cdd.dgterritorio.gov.pt/) portal.
66
GMT.jl provides two functions for working with this dataset:
77

8-
- **`dgt_lidar`** — authenticates against the DGT portal and downloads all tiles intersecting a bounding box.
9-
- **`dgt_mosaic`** — assembles downloaded tiles into a single, clipped GeoTIFF.
8+
- {{< gmtref dgt_lidar >}} — authenticates against the DGT portal and downloads all tiles intersecting a bounding box.
9+
- {{< gmtref dgt_mosaic >}} — assembles downloaded tiles into a single, clipped GeoTIFF.
1010

1111
Five collections are available:
1212

@@ -53,7 +53,7 @@ You can also create or edit the file directly with any text editor.
5353

5454
### Load the extension
5555

56-
`dgt_lidar` lives in the `GMTDGTLidarExt` package extension, activated automatically when `HTTP` is loaded:
56+
{{< gmtref dgt_lidar >}} lives in the `GMTDGTLidarExt` package extension, activated automatically when `HTTP` is loaded:
5757

5858
```{julia}
5959
using GMT, HTTP
@@ -408,6 +408,22 @@ dgt_lidar([-8.995, -8.968, 38.473, 38.486]; collection="LAZ", output_dir="_arrab
408408
pc = lasread(joinpath(homedir(), ".gmt/DGT/arrabida_laz/LAZ/LO-148174-06-2024.laz"))
409409
```
410410

411+
And we can make a little detour and drape a Bing aereal image fetch with mosaic on top of the DEM:
412+
413+
```{julia}
414+
#| eval: false
415+
# Get the DEM as a grid in memory, reprojected to geographic coordinates
416+
G = dgt_lidar([-8.995, -8.968, 38.473, 38.486]; output_dir = "_arrabida", mosaic="grid", proj="geog");
417+
418+
# Use its limits to fetch a Bing image of the same area. We use a zoom=16 to get a approximate resolution to G
419+
I = mosaic(G, zoom=16);
420+
421+
# Visualize the draped result
422+
viz(G, drape=I, view=(155,35), zsize=3)
423+
```
424+
425+
![](/assets/portinho_draped.png){width="700" .center}
426+
411427

412428
## Large Areas — Automatic Subdivision
413429

0 commit comments

Comments
 (0)