Skip to content

Commit

Permalink
Add last set of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Médéric Ribreux authored and Médéric RIBREUX committed May 29, 2016
1 parent 48d45fb commit b40d2ff
Show file tree
Hide file tree
Showing 4 changed files with 243 additions and 8 deletions.
75 changes: 68 additions & 7 deletions python/plugins/processing/algs/grass7/TODO
Original file line number Diff line number Diff line change
@@ -1,9 +1,70 @@
* http://trac.osgeo.org/grass/wiki/Grass7/NewFeatures#Replacedandremovedmodules
* TODO: Merged modules
r.average: merged into G7:r.statistics, G7:r.statistics2, G7:r.statistics3
r.bilinear merged into G7:r.resamp.interp
r.median: merged into G7:r.statistics, G7:r.statistics2, G7:r.statistics3
r.sum: merged into G7:r.statistics, G7:r.statistics2, G7:r.statistics3
* http://trac.osgeo.org/grass/wiki/Grass7/NewFeatures#Renamedmodules
TODO List for GRASS7 algorithms support into QGIS Processing

Unit tests
==========

i.* modules:
------------

* i.albedo: needs better data
* i.aster.toar: needs OutputDir support in tests
* i.atcorr: broken implementation
* i.biomass: OK (basic implementation)
* i.cca: needs OutputDir support in tests
* i.cluster: OK (full implementation)
* i.colors.enhance: needs other raster data
* i.eb.eta: OK (basic implementation)
* i.eb.evapfr: needs better data
* i.eb.hsebal01: OK (basic implementation)
* i.eb.netrad: OK (basic implementation)
* i.eb.soilheatflux: OK (basic implementation)
* i.emissivity: OK (basic implementation)
* i.evapo.mh: OK (basic implementation)
* i.evapo.pm: OK (basic implementation)
* i.evapo.pt: OK (basic implementation)
* i.evapo.time: broken (don't know why, should work)
* i.fft: OK (full implementation)
* i.gensig: OK (full implementation)
* i.gensigset: OK (full implementation)
* i.group: OK (full implementation)
* i.his.rgb: needs better data
* i.ifft: needs specific raster data
* i.image.mosaic: OK (basic implementation)
* i.in.spotvgt: needs probably a true NVDI SPOT file (quite huge for tests).
* i.landsat.acca: needs better data
* i.landsat.toar: needs OutputDir support in tests
* i.maxlik: OK (full implementation)
* i.modis.qc: OK (full implementation)
* i.oif: OK (full implementation)
* i.ortho.camera: not implemented in Processing
* i.ortho.elev: not implemented in Processing
* i.ortho.rectify: not implemented in Processing
* i.pansharpen: OK (full implementation)
* i.pca: needs OutputDir support in tests
* i.rectify: needs OutputDir support in tests
* i.rgb.his: OK (full implementation)
* i.segment: OK (full implementation)
* i.smap: OK (full implementation)
* i.spectral: not implementable in Processing
* i.target: not implementable in Processing
* i.tasscap: needs OutputDir support in tests
* i.topo.corr.ill: OK (basic implementation)
* i.topo.corr: needs OutputDir support in tests
* i.vi: OK (basic implementation)
* i.zc: OK (basic implementation)

r.* modules
-----------

Need to write everything

v.* modules
-----------

Need to write everything

Other
=====

* TODO: decide what to do with nviz:
nviz_cmd -> G7:m.nviz.image
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
8
2 19 13.00 -47.410 -20.234
1
1
15
-0.600
-1000
64
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#produit par i.cluster
#Class 1
1596
1.83333 1.53759 3.31579
0.823615
-0.22884 0.584793
0.0131661 0.015707 0.563537
#Class 2
3341
2.11045 4.35498 3.32266
0.790493
-0.109278 0.472751
0.0125567 -0.0124767 0.565921
#Class 3
3491
5.32655 1.72558 3.32713
0.671555
0.189352 0.758483
-0.00255721 -0.0248173 0.544533
#Class 4
3324
4.34567 4.36522 3.30235
0.22625
0.0708273 0.484688
0.00740409 0.00750866 0.56369
#Class 5
2991
6 4.55734 3.30291
0
0 0.246795
0 0.00235825 0.573099
137 changes: 136 additions & 1 deletion python/plugins/processing/tests/testdata/grass7_algorithm_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,6 @@ tests:
hash: c6b99e12c2eab3016bbf8d15888c353c3fdb1b84674deac78e3e2bfc
type: rasterhash

# Don't work, needs to handle external files in tests code
- algorithm: grass7:i.smap
name: GRASS7 i.smap
params:
Expand All @@ -464,3 +463,139 @@ tests:
output:
hash: f9e99ac3891b23c650add0478bb5225444183c61c6a4c321a7c2a16f
type: rasterhash

- algorithm: grass7:i.maxlik
name: GRASS7 i.maxlik
params:
GRASS_REGION_PARAMETER: '344500.0,358400.0,6682800.0,6693700.0'
input:
params:
- name: custom/grass7/raster_6class.tif
type: raster
- name: custom/grass7/raster_5class.tif
type: raster
- name: custom/grass7/raster_4class.tif
type: raster
type: multi
signaturefile:
type: file
name: custom/grass7/i.cluster.txt
results:
output:
hash: a7b63bdda06fdcac715b8fe22e440238594a3dd0e189ca2328a3d694
type: rasterhash
reject:
hash: 87b3d0be1315a040a61c4d4dec2bd5837881ad207a4140a89a28997a
type: rasterhash

# - algorithm: grass7:i.evapo.time
# name: GRASS7 i.evapo.time
# params:
# GRASS_REGION_PARAMETER: '344500.0,358400.0,6682800.0,6693700.0'
# eta:
# params:
# - name: custom/grass7/raster_5class.tif
# type: raster
# - name: custom/grass7/raster_4class.tif
# type: raster
# type: multi
# eta_doy:
# params:
# - name: custom/grass7/raster_6class.tif
# type: raster
# - name: custom/grass7/raster_5class.tif
# type: raster
# type: multi
# eto:
# params:
# - name: custom/grass7/float_raster.tif
# type: raster
# - name: custom/grass7/raster_6class.tif
# type: raster
# type: multi
# results:
# output:
# hash: a361b729bf0b0628fa66822297dc57e71e0b2e56331f7145c3cfdce6
# type: rasterhash

- algorithm: grass7:i.eb.hsebal01
name: GRASS7 i.eb.hsebal01
params:
GRASS_REGION_PARAMETER: '344500.0,358400.0,6682800.0,6693700.0'
aerodynresistance:
name: custom/grass7/raster_6class.tif
type: raster
frictionvelocitystar: 0.32407
netradiation:
name: custom/grass7/raster_4class.tif
type: raster
soilheatflux:
name: custom/grass7/raster_5class.tif
type: raster
temperaturemeansealevel:
name: custom/grass7/float_raster.tif
type: raster
vapourpressureactual: 1.511
results:
output:
hash: 2706c64a65a6a603857937554a5e8787a1429e1ca6b8551b0dea7b8f
type: rasterhash

- algorithm: grass7:i.modis.qc
name: GRASS7 i.modis.qc
params:
GRASS_REGION_PARAMETER: '344500.0,358400.0,6682800.0,6693700.0'
input:
name: custom/grass7/float_raster.tif
type: raster
productname: 8
qcname: 5
results:
output:
hash: 0439e59b8c142a7f58cdece674c058891b64aafb1273ed6ce5e3ecf9
type: rasterhash

- algorithm: grass7:i.image.mosaic
name: GRASS7 i.image.mosaic
params:
GRASS_REGION_PARAMETER: '344500.0,358400.0,6682800.0,6693700.0'
input:
params:
- name: custom/grass7/raster_6class.tif
type: raster
- name: custom/grass7/raster_5class.tif
type: raster
- name: custom/grass7/raster_4class.tif
type: raster
type: multi
results:
output:
hash: 651bde2da0f150c0dbe7790da98f371e56de20a3f1cbb13ef6a69657
type: rasterhash

- algorithm: grass7:i.eb.hsebal01.coords
name: GRASS7 i.eb.hsebal01.coords
params:
GRASS_REGION_PARAMETER: '344500.0,358400.0,6682800.0,6693700.0'
aerodynresistance:
name: custom/grass7/float_raster.tif
type: raster
column_dry_pixel: '50'
column_wet_pixel: '10'
frictionvelocitystar: 0.32407
netradiation:
name: custom/grass7/float_raster.tif
type: raster
row_dry_pixel: '50'
row_wet_pixel: '10'
soilheatflux:
name: custom/grass7/float_raster.tif
type: raster
temperaturemeansealevel:
name: custom/grass7/float_raster.tif
type: raster
vapourpressureactual: 1.511
results:
output:
hash: f564acd642f6f0ea76cbe55d3565d083e055d2e81dde97365f786bad
type: rasterhash

0 comments on commit b40d2ff

Please sign in to comment.