Skip to content

Commit 02f3458

Browse files
authored
Merge branch 'main' into docs-gh-edit
2 parents ebd8304 + 2f7de93 commit 02f3458

File tree

19 files changed

+71
-81
lines changed

19 files changed

+71
-81
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,7 @@ jobs:
8888
context: .
8989
tags: ${{ steps.meta.outputs.tags }}
9090
file: docker/${{ matrix.os }}/Dockerfile
91+
cache-from: type=gha,scope=${{ matrix.os }}
92+
cache-to: type=gha,mode=max,scope=${{ matrix.os }}
9193
- name: Image digest
9294
run: echo ${{ steps.docker_build.outputs.digest }}

.github/workflows/python-code-quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ jobs:
3030
PYTHON_VERSION: "3.13"
3131
MIN_PYTHON_VERSION: "3.9"
3232
# renovate: datasource=pypi depName=flake8
33-
FLAKE8_VERSION: "7.1.1"
33+
FLAKE8_VERSION: "7.1.2"
3434
# renovate: datasource=pypi depName=pylint
3535
PYLINT_VERSION: "3.3.4"
3636
# renovate: datasource=pypi depName=bandit
3737
BANDIT_VERSION: "1.8.2"
3838
# renovate: datasource=pypi depName=ruff
39-
RUFF_VERSION: "0.9.5"
39+
RUFF_VERSION: "0.9.6"
4040

4141
runs-on: ${{ matrix.os }}
4242
permissions:

.markdownlint.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ fix: true
88
MD041: false # first-line-h1
99

1010
# Errors from .html to .md rename (first step in HTML to Markdown conversion)
11-
no-duplicate-heading: false
12-
heading-increment: false
1311
no-inline-html: false
1412
no-alt-text: false
1513
line-length: false

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ repos:
3838
)
3939
- repo: https://github.com/astral-sh/ruff-pre-commit
4040
# Ruff version.
41-
rev: v0.9.5
41+
rev: v0.9.6
4242
hooks:
4343
# Run the linter.
4444
- id: ruff
@@ -50,7 +50,7 @@ repos:
5050
hooks:
5151
- id: markdownlint-fix
5252
- repo: https://github.com/pycqa/flake8
53-
rev: 7.1.1
53+
rev: 7.1.2
5454
hooks:
5555
- id: flake8
5656
exclude: |

display/d.mon/d.mon.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The desired monitor should be started once and need not be restarted
2222
unless it is stopped for some reason. A monitor may continue to run for
2323
any length of time, even when no GRASS session is being run.
2424

25-
### Stopping a monitor
25+
### Listing currently running monitors
2626

2727
A graphics monitor has two different types of status: monitor program
2828
*not running*, and monitor *running*. A monitor that has been started

docker/alpine/Dockerfile

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.21@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099 as common
1+
FROM alpine:3.21@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c as common
22

33
# Based on:
44
# https://github.com/mundialis/docker-grass-gis/blob/master/Dockerfile
@@ -167,15 +167,6 @@ RUN echo " => Configure and compile grass" && \
167167
make install && \
168168
ldconfig /etc/ld.so.conf.d
169169

170-
# Build the GDAL-GRASS plugin
171-
# renovate: datasource=github-tags depName=OSGeo/gdal-grass
172-
ARG GDAL_GRASS_VERSION=1.0.3
173-
RUN git clone --branch $GDAL_GRASS_VERSION --depth 1 https://github.com/OSGeo/gdal-grass.git /src/gdal-grass
174-
WORKDIR /src/gdal-grass
175-
RUN cmake -B build -DAUTOLOAD_DIR=/usr/lib/gdalplugins -DBUILD_TESTING=OFF && \
176-
cmake --build build && \
177-
cmake --install build
178-
179170
# Get rid of version number here, restore in next stage via symbolic link
180171
RUN mv $(grass --config path) /usr/local/grass
181172

@@ -200,13 +191,23 @@ ENV GRASS_SKIP_MAPSET_OWNER_CHECK=1 \
200191
LC_ALL="en_US.UTF-8" \
201192
PYTHONPATH="/usr/local/grass/etc/python:$PYTHONPATH"
202193

203-
# Copy GRASS GIS and GDAL GRASS driver from build image
194+
# Copy GRASS GIS from build image
204195
COPY --from=build /usr/local/bin/grass /usr/local/bin/grass
205196
COPY --from=build /usr/local/grass* /usr/local/grass/
206-
COPY --from=build /usr/lib/gdalplugins/*_GRASS.so /usr/lib/gdalplugins/
207197
# Set GISBASE
208198
ENV GISBASE /usr/local/grass
209199

200+
# Build the GDAL-GRASS plugin
201+
# renovate: datasource=github-tags depName=OSGeo/gdal-grass
202+
ARG GDAL_GRASS_VERSION=1.0.3
203+
RUN git clone --branch $GDAL_GRASS_VERSION --depth 1 https://github.com/OSGeo/gdal-grass.git /src/gdal-grass
204+
WORKDIR /src/gdal-grass
205+
RUN cmake -B build -DAUTOLOAD_DIR=/usr/lib/gdalplugins -DBUILD_TESTING=OFF && \
206+
cmake --build build && \
207+
cmake --install build
208+
# Copy GDAL GRASS driver from build image
209+
COPY --from=build /usr/lib/gdalplugins/*_GRASS.so /usr/lib/gdalplugins/
210+
210211
# run simple LAZ test
211212
COPY docker/testdata/simple.laz /tmp/
212213
COPY docker/testdata/test_grass_python.py docker/testdata/test_grass_session.py docker/alpine/grass_tests.sh /scripts/

docker/alpine/grass_tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
apk add --no-cache py3-scikit-learn
77

88
echo "Testing the GDAL-GRASS plugins:"
9-
gdalinfo --formats | grep -p "GRASS Rasters" && \
10-
ogrinfo --formats | grep -p "GRASS Vectors" || echo "...failed"
9+
gdalinfo --formats | grep "GRASS Rasters" && \
10+
ogrinfo --formats | grep "GRASS Vectors" || echo "...failed"
1111

1212
# Test grass-session
1313
/usr/bin/python3 /scripts/test_grass_session.py

imagery/i.ortho.photo/i.ortho.rectify/i.ortho.rectify.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ line or the GUI, or it can be invoked as OPTION 8 through
4747
[i.ortho.photo](i.ortho.photo.md), an interactive terminal is used to
4848
determine the options.
4949

50-
#### Interactive mode
50+
### Interactive mode
5151

5252
You are first asked if all images within the imagery group should be
5353
rectified. If this option is not chosen, you are asked to specify for

imagery/i.vi/i.vi.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ proper level of correction to use with *i.vi*.
5959

6060
### Vegetation Indices
6161

62-
**ARVI: Atmospheric Resistant Vegetation Index**
62+
#### ARVI: Atmospheric Resistant Vegetation Index
6363

6464
ARVI is resistant to atmospheric effects (in comparison to the NDVI) and
6565
is accomplished by a self correcting process for the atmospheric effect
@@ -73,7 +73,7 @@ ARVI = (nirchan - (2.0*redchan - bluechan)) /
7373
( nirchan + (2.0*redchan - bluechan))
7474
```
7575

76-
**CI: Crust Index**
76+
#### CI: Crust Index
7777

7878
Advantage is taken of a unique spectral feature of soil biogenic crust
7979
containing cyanobacteria. It has been shown that the special phycobilin
@@ -90,15 +90,15 @@ CI = 1 - (redchan - bluechan) /
9090
(redchan + bluechan)
9191
```
9292

93-
**DVI: Difference Vegetation Index**
93+
#### DVI: Difference Vegetation Index
9494

9595
```sh
9696
dvi( redchan, nirchan )
9797

9898
DVI = ( nirchan - redchan )
9999
```
100100

101-
**EVI: Enhanced Vegetation Index**
101+
#### EVI: Enhanced Vegetation Index
102102

103103
The enhanced vegetation index (EVI) is an optimized index designed to
104104
enhance the vegetation signal with improved sensitivity in high biomass
@@ -115,7 +115,7 @@ EVI = 2.5 * ( nirchan - redchan ) /
115115
( nirchan + 6.0 * redchan - 7.5 * bluechan + 1.0 )
116116
```
117117

118-
**EVI2: Enhanced Vegetation Index 2**
118+
#### EVI2: Enhanced Vegetation Index 2
119119

120120
A 2-band EVI (EVI2), without a blue band, which has the best similarity
121121
with the 3-band EVI, particularly when atmospheric effects are
@@ -133,7 +133,7 @@ EVI2 = 2.5 * ( nirchan - redchan ) /
133133
( nirchan + 2.4 * redchan + 1.0 )
134134
```
135135

136-
**GARI: green atmospherically resistant vegetation index**
136+
#### GARI: green atmospherically resistant vegetation index
137137

138138
The formula was actually defined: Gitelson, Anatoly A.; Kaufman, Yoram
139139
J.; Merzlyak, Mark N. (1996) Use of a green channel in remote sensing of
@@ -148,7 +148,7 @@ GARI = ( nirchan - (greenchan - (bluechan - redchan))) /
148148
( nirchan + (greenchan - (bluechan - redchan)))
149149
```
150150

151-
**GEMI: Global Environmental Monitoring Index**
151+
#### GEMI: Global Environmental Monitoring Index
152152

153153
```sh
154154
gemi( redchan, nirchan )
@@ -160,7 +160,7 @@ GEMI = (( (2*((nirchan * nirchan)-(redchan * redchan)) +
160160
( (redchan - 0.125) / (1 - redchan))
161161
```
162162

163-
**GVI: Green Vegetation Index**
163+
#### GVI: Green Vegetation Index
164164

165165
```sh
166166
gvi( bluechan, greenchan, redchan, nirchan, chan5chan, chan7chan)
@@ -170,23 +170,23 @@ GVI = ( -0.2848 * bluechan - 0.2435 * greenchan -
170170
0.1800 * chan7chan)
171171
```
172172

173-
**IPVI: Infrared Percentage Vegetation Index**
173+
#### IPVI: Infrared Percentage Vegetation Index
174174

175175
```sh
176176
ipvi( redchan, nirchan )
177177

178178
IPVI = nirchan/(nirchan+redchan)
179179
```
180180

181-
**MSAVI2: second Modified Soil Adjusted Vegetation Index**
181+
#### MSAVI2: second Modified Soil Adjusted Vegetation Index
182182

183183
```sh
184184
msavi2( redchan, nirchan )
185185

186186
MSAVI2 = (1/2)*(2*NIR+1-sqrt((2*NIR+1)^2-8*(NIR-red)))
187187
```
188188

189-
**MSAVI: Modified Soil Adjusted Vegetation Index**
189+
#### MSAVI: Modified Soil Adjusted Vegetation Index
190190

191191
```sh
192192
msavi( redchan, nirchan )
@@ -198,7 +198,7 @@ where a is the soil line intercept, s is the soil line slope, and X is
198198
an adjustment factor which is set to minimize soil noise (0.08 in
199199
original papers).
200200

201-
**NDVI: Normalized Difference Vegetation Index**
201+
#### NDVI: Normalized Difference Vegetation Index
202202

203203
```sh
204204
ndvi( redchan, nirchan )
@@ -216,7 +216,7 @@ Satellite specific band numbers ([NIR, Red]):
216216
NDVI = (NIR - Red) / (NIR + Red)
217217
```
218218

219-
**NDWI: Normalized Difference Water Index** (after McFeeters, 1996)
219+
#### NDWI: Normalized Difference Water Index (after McFeeters, 1996)
220220

221221
This index is suitable to detect water bodies.
222222

@@ -238,31 +238,33 @@ NDWI = (NIR - SWIR) / (NIR + SWIR)
238238
This index is important for monitoring vegetation health (not
239239
implemented).
240240

241-
**PVI: Perpendicular Vegetation Index**
241+
#### PVI: Perpendicular Vegetation Index
242242

243243
```sh
244244
pvi( redchan, nirchan, soil_line_slope )
245245

246246
PVI = sin(a)NIR-cos(a)red
247247
```
248248

249-
**SAVI: Soil Adjusted Vegetation Index**
249+
#### SAVI: Soil Adjusted Vegetation Index
250250

251251
```sh
252252
savi( redchan, nirchan )
253253

254254
SAVI = ((1.0+0.5)*(nirchan - redchan)) / (nirchan + redchan +0.5)
255255
```
256256

257-
**SR: Simple Vegetation ratio**
257+
#### SR: Simple Vegetation ratio
258258

259259
```sh
260260
sr( redchan, nirchan )
261261

262262
SR = (nirchan/redchan)
263263
```
264264

265-
**VARI: Visible Atmospherically Resistant Index** VARI was designed to
265+
#### VARI: Visible Atmospherically Resistant Index
266+
267+
VARI was designed to
266268
introduce an atmospheric self-correction (Gitelson A.A., Kaufman Y.J.,
267269
Stark R., Rundquist D., 2002. Novel algorithms for estimation of
268270
vegetation fraction Remote Sensing of Environment (80), pp76-87.)
@@ -273,7 +275,7 @@ vari = ( bluechan, greenchan, redchan )
273275
VARI = (green - red ) / (green + red - blue)
274276
```
275277

276-
**WDVI: Weighted Difference Vegetation Index**
278+
#### WDVI: Weighted Difference Vegetation Index
277279

278280
```sh
279281
wdvi( redchan, nirchan, soil_line_weight )
@@ -464,7 +466,7 @@ i.landsat.toar input=lsat7_2002. output=lsat7_2002_toar. sensor=tm7 \
464466
The resulting Landsat channels are names
465467
`lsat7_2002_toar.1 .. lsat7_2002_toar.8`.
466468

467-
#### Calculation of NDVI
469+
#### NDVI
468470

469471
The calculation of NDVI from the reflectance values is done as follows:
470472

@@ -481,7 +483,7 @@ d.rast.leg lsat7_2002.ndvi
481483
![North Carolina dataset: NDVI](i_vi_ndvi.png)
482484
North Carolina dataset: NDVI
483485

484-
#### Calculation of ARVI
486+
#### ARVI
485487

486488
The calculation of ARVI from the reflectance values is done as follows:
487489

@@ -497,7 +499,7 @@ d.rast.leg lsat7_2002.arvi
497499
![North Carolina dataset: ARVI](i_vi_arvi.png)
498500
North Carolina dataset: ARVI
499501

500-
#### Calculation of GARI
502+
#### GARI
501503

502504
The calculation of GARI from the reflectance values is done as follows:
503505

0 commit comments

Comments
 (0)