Skip to content

Commit 0c19539

Browse files
committed
Do not use absolute file names.
1 parent 7eda232 commit 0c19539

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

docs/src/gallery/L8cube_img/remotes_L8_cube_img.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@ Here we will show examples of the type of things we can do with Landsat 8 data s
33

44
The data was downloaded from [EarthExplorer](https://earthexplorer.usgs.gov) and comprises the scene with Product ID ```LC08_L1TP_204033_20210525_20210529_02_T1```.
55

6-
The _cube_ was made with this instructions (but they would only work if you had the scene files in your computer and **must** adapt for your own path). Note that in ```tplt``` bellow, the ```"C:/v/LC08_L1TP_204033_20210525_20210529_02_T1/"``` is the file path and the ```LC08_L1TP_204033_20210525_20210529_02_T1_B``` is the part of the file names that is common to all band names.
6+
The _cube_ was made with this instructions. Note that the ```LC08_L1TP_204033_20210525_20210529_02_T1_B``` is the part of the file names that is common to all band names.
77

8-
```tplt = "C:/v/LC08_L1TP_204033_20210525_20210529_02_T1/LC08_L1TP_204033_20210525_20210529_02_T1_B";```
9-
10-
```cube = cutcube(bands=[2,3,4,5,6,7,10], template=tplt, region=(485490,531060,4283280,4330290), save="LC08_L1TP_20210525_02_cube.tiff")```
8+
```julia
9+
using RemoteS, GMT
10+
#cd(path-to-where-files-are-stored)
11+
tplt = "LC08_L1TP_204033_20210525_20210529_02_T1_B"; # Template name
12+
cube = cutcube(bands=[2,3,4,5,6,7,10], template=tplt, region=(485490,531060,4283280,4330290), save="LC08_L1TP_20210525_02_cube.tiff")```
13+
```
1114

1215
This creates a 3D GeoTIFF file with the companion MTL file saved in it as Metadata. We can see the band info by running the ```reportbands``` function. That information is quite handy because we can, for example, just refer to the _red_ band and it will figure out which layer of the cube contains the Red band.
1316

1417

1518
```julia
1619
using RemoteS, GMT
17-
reportbands("c:/v/LC08_L1TP_20210525_02_cube.tiff")
20+
reportbands("LC08_L1TP_20210525_02_cube.tiff")
1821
7-element Vector{String}:
1922
"Band 2 - Blue [0.45-0.51]"
2023
"Band 3 - Green [0.53-0.59]"
@@ -28,7 +31,7 @@ reportbands("c:/v/LC08_L1TP_20210525_02_cube.tiff")
2831
So to start our exploration the best is to generate a true color image. The ```truecolor``` function knows how to do that automatically including the histogram contrast stretch.
2932

3033
```julia
31-
Irgb = truecolor("c:/v/LC08_L1TP_20210525_02_cube.tiff");
34+
Irgb = truecolor("LC08_L1TP_20210525_02_cube.tiff");
3235
imshow(Irgb)
3336
```
3437

@@ -39,7 +42,7 @@ imshow(Irgb)
3942
And we can compute the brightness temperature in Celsius at the Top of Atmosphere (TOA) from Band 10.
4043

4144
```julia
42-
T = dn2temperature("c:/v/LC08_L1TP_20210525_02_cube.tiff", band=10);
45+
T = dn2temperature("LC08_L1TP_20210525_02_cube.tiff", band=10);
4346
imshow(T, dpi=150, colorbar=true)
4447
```
4548

@@ -50,7 +53,7 @@ imshow(T, dpi=150, colorbar=true)
5053
Or the Radiance TOA for the Blue band.
5154

5255
```julia
53-
Btoa = dn2radiance("c:/v/LC08_L1TP_20210525_02_cube.tiff", bandname="blue");
56+
Btoa = dn2radiance("LC08_L1TP_20210525_02_cube.tiff", bandname="blue");
5457
imshow(Btoa, dpi=150, color=:gray)
5558
```
5659

@@ -89,7 +92,7 @@ we can do it all at once with the ```dn2radiance``` applied to the cube and, lik
8992
with ```truecolor```
9093

9194
```julia
92-
cube_toa_rad = dn2radiance("c:/v/LC08_L1TP_20210525_02_cube.tiff");
95+
cube_toa_rad = dn2radiance("LC08_L1TP_20210525_02_cube.tiff");
9396
Irgb_toa = truecolor(cube_toa_rad);
9497
imshow(Irgb_toa)
9598
```

0 commit comments

Comments
 (0)