Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #3062 from medspx/processing_imagery
[Processing] GRASS7 complete i.* modules (implements Redmine #5722)
  • Loading branch information
m-kuhn committed May 29, 2016
2 parents 1b06324 + 59faf95 commit 22794ce
Show file tree
Hide file tree
Showing 81 changed files with 2,741 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Expand Up @@ -30,6 +30,7 @@ matrix:
- flex - flex
- flip - flip
- libfcgi-dev - libfcgi-dev
- libfftw3-3
- libpq-dev - libpq-dev
- libqscintilla2-dev - libqscintilla2-dev
- libqt4-dev - libqt4-dev
Expand Down Expand Up @@ -83,6 +84,7 @@ matrix:
- graphviz - graphviz
- libpq-dev - libpq-dev
- libfcgi-dev - libfcgi-dev
- libfftw3-3
- pkg-config - pkg-config
- poppler-utils - poppler-utils
- txt2tags - txt2tags
Expand Down
1 change: 1 addition & 0 deletions ci/travis/linux/qt5/blacklist.txt
Expand Up @@ -13,3 +13,4 @@ PyQgsVirtualLayerDefinition
PyQgsVirtualLayerProvider PyQgsVirtualLayerProvider
qgis_composermapgridtest qgis_composermapgridtest
qgis_composerutils qgis_composerutils
ProcessingGrass7AlgorithmsTest
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/grass7/Grass7Algorithm.py
Expand Up @@ -558,7 +558,7 @@ def exportVectorLayer(self, orgFilename):
return command return command


def setSessionProjectionFromProject(self, commands): def setSessionProjectionFromProject(self, commands):
if not Grass7Utils.projectionSet: if not Grass7Utils.projectionSet and iface:
proj4 = iface.mapCanvas().mapSettings().destinationCrs().toProj4() proj4 = iface.mapCanvas().mapSettings().destinationCrs().toProj4()
command = 'g.proj' command = 'g.proj'
command += ' -c' command += ' -c'
Expand Down
75 changes: 68 additions & 7 deletions python/plugins/processing/algs/grass7/TODO
@@ -1,9 +1,70 @@
* http://trac.osgeo.org/grass/wiki/Grass7/NewFeatures#Replacedandremovedmodules TODO List for GRASS7 algorithms support into QGIS Processing
* TODO: Merged modules
r.average: merged into G7:r.statistics, G7:r.statistics2, G7:r.statistics3 Unit tests
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 i.* modules:
* http://trac.osgeo.org/grass/wiki/Grass7/NewFeatures#Renamedmodules ------------

* i.albedo: needs better data
* i.aster.toar: needs OutputDir support in tests
* i.atcorr: OK (basic 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: * TODO: decide what to do with nviz:
nviz_cmd -> G7:m.nviz.image nviz_cmd -> G7:m.nviz.image
11 changes: 11 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.albedo.txt
@@ -0,0 +1,11 @@
i.albedo
Computes broad band albedo from surface reflectance.
Imagery (i.*)
ParameterMultipleInput|input|Name of input raster maps|3|False
ParameterBoolean|-m|MODIS (7 input bands:1,2,3,4,5,6,7)|False
ParameterBoolean|-n|NOAA AVHRR (2 input bands:1,2)|False
ParameterBoolean|-l|Landsat 5+7 (6 input bands:1,2,3,4,5,7)|False
ParameterBoolean|-a|ASTER (6 input bands:1,3,5,6,8,9)|False
ParameterBoolean|-c|Aggressive mode (Landsat)|False
ParameterBoolean|-d|Soft mode (MODIS)|False
OutputRaster|output|Albedo
13 changes: 13 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.aster.toar.txt
@@ -0,0 +1,13 @@
i.aster.toar
Calculates Top of Atmosphere Radiance/Reflectance/Brightness Temperature from ASTER DN.
Imagery (i.*)
ParameterMultipleInput|input|Names of ASTER DN layers (15 layers)|3|False
ParameterNumber|dayofyear|Day of Year of satellite overpass [0-366]|0|366|0|False
ParameterNumber|sun_elevation|Sun elevation angle (degrees, < 90.0)|0.0|90.0|45.0|False
ParameterBoolean|-r|Output is radiance (W/m2)|False
ParameterBoolean|-a|VNIR is High Gain|False
ParameterBoolean|-b|SWIR is High Gain|False
ParameterBoolean|-c|VNIR is Low Gain 1|False
ParameterBoolean|-d|SWIR is Low Gain 1|False
ParameterBoolean|-e|SWIR is Low Gain 2|False
OutputDirectory|output|Output Directory
15 changes: 8 additions & 7 deletions python/plugins/processing/algs/grass7/description/i.atcorr.txt
Expand Up @@ -2,14 +2,15 @@ i.atcorr
Performs atmospheric correction using the 6S algorithm. Performs atmospheric correction using the 6S algorithm.
Imagery (i.*) Imagery (i.*)
ParameterRaster|input|Name of input raster map|False ParameterRaster|input|Name of input raster map|False
ParameterBoolean|-a|Input from ETM+ image taken after July 1, 2000|False ParameterRange|range|Input imagery range [0,255]|0,255|True
ParameterBoolean|-b|Input from ETM+ image taken before July 1, 2000|False
ParameterRaster|elevation|Input altitude raster map in m (optional)|True ParameterRaster|elevation|Input altitude raster map in m (optional)|True
ParameterRaster|visibility|Input visibility raster map in km (optional)|True ParameterRaster|visibility|Input visibility raster map in km (optional)|True
ParameterFile|parameters|Name of input text file|False ParameterFile|parameters|Name of input text file|False|False
ParameterRange|range|Input imagery range [0,255]|0,255 ParameterRange|rescale|Rescale output raster map [0,255]|0,255|True
ParameterBoolean|-o|Try to increase computation speed when altitude and/or visibility map is used|True
OutputRaster|output|Atmospheric correction OutputRaster|output|Atmospheric correction
ParameterBoolean|-f|Output raster is floating point|False *ParameterBoolean|-i|Output raster map as integer|False
ParameterRange|rescale|Rescale output raster map [0,255]|0,255 *ParameterBoolean|-r|Input raster map converted to reflectance (default is radiance)|False
*ParameterBoolean|-a|Input from ETM+ image taken after July 1, 2000|False
*ParameterBoolean|-b|Input from ETM+ image taken before July 1, 2000|False



10 changes: 10 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.biomass.txt
@@ -0,0 +1,10 @@
i.biomass
Computes biomass growth, precursor of crop yield calculation.
Imagery (i.*)
ParameterRaster|fpar|Name of fPAR raster map|False
ParameterRaster|lightuse_efficiency|Name of light use efficiency raster map (UZB:cotton=1.9)|False
ParameterRaster|latitude|Name of degree latitude raster map [dd.ddd]|False
ParameterRaster|dayofyear|Name of Day of Year raster map [1-366]|False
ParameterRaster|transmissivity_singleway|Name of single-way transmissivity raster map [0.0-1.0]False
ParameterRaster|water_availability|Value of water availability raster map [0.0-1.0]|False
OutputRaster|output|Biomass
6 changes: 6 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.cca.txt
@@ -0,0 +1,6 @@
i.cca
Canonical components analysis (CCA) program for image processing.
Imagery (i.*)
ParameterMultipleInput|input|Input rasters (2 to 8)|3|False
ParameterFile|signature|File containing spectral signatures|False|False
OutputDirectory|output|Output Directory
13 changes: 13 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.cluster.txt
@@ -0,0 +1,13 @@
i.cluster
Generates spectral signatures for land cover types in an image using a clustering algorithm.
Imagery (i.*)
ParameterMultipleInput|input|Input rasters|3|False
ParameterNumber|classes|Initial number of classes (1-255)|1|255|1|True
ParameterFile|seed|Name of file containing initial signatures|False|True
ParameterString|sample|Sampling intervals (by row and col)|None|False|True
ParameterNumber|iterations|Maximum number of iterations|1|None|30|True
ParameterNumber|convergence|Percent convergence|0.0|100.0|98.0|True
ParameterNumber|separation|Cluster separation|0.0|None|0.0|True
ParameterNumber|min_size|Minimum number of pixels in a class|1|None|17|True
OutputFile|signaturefile|Signature File
OutputFile|reportfile|Final Report File
@@ -0,0 +1,15 @@
i.colors.enhance
Performs auto-balancing of colors for RGB images.
Imagery (i.*)
ParameterRaster|red|Name of red channel|False
ParameterRaster|green|Name of green channel|False
ParameterRaster|blue|Name of blue channel|False
ParameterNumber|strength|Cropping intensity (upper brightness level)|0|100|98|True
*ParameterBoolean|-f|Extend colors to full range of data on each channel|False
*ParameterBoolean|-p|Preserve relative colors, adjust brightness only|False
*ParameterBoolean|-r|Reset to standard color range|False
*ParameterBoolean|-s|Process bands serially (default: run in parallel)|False
OutputRaster|redoutput|Enhanced Red
OutputRaster|greenoutput|Enhanced Green
OutputRaster|blueoutput|Enhanced Blue

@@ -0,0 +1,7 @@
i.eb.eta
Actual evapotranspiration for diurnal period (Bastiaanssen, 1995).
Imagery (i.*)
ParameterRaster|netradiationdiurnal|Name of the diurnal net radiation map [W/m2]|False
ParameterRaster|evaporativefraction|Name of the evaporative fraction map|False
ParameterRaster|temperature|Name of the surface skin temperature [K]|False
OutputRaster|output|Evapotranspiration
@@ -0,0 +1,9 @@
i.eb.evapfr
Computes evaporative fraction (Bastiaanssen, 1995) and root zone soil moisture (Makin, Molden and Bastiaanssen, 2001).
Imagery (i.*)
ParameterRaster|netradiation|Name of Net Radiation raster map [W/m2]|False
ParameterRaster|soilheatflux|Name of soil heat flux raster map [W/m2]|False
ParameterRaster|sensibleheatflux|Name of sensible heat flux raster map [W/m2]|False
Hardcoded|-m
OutputRaster|evaporativefraction|Evaporative Fraction
OutputRaster|soilmoisture|Root Zone Soil Moisture
@@ -0,0 +1,15 @@
i.eb.hsebal01
i.eb.hsebal01.coords - Computes sensible heat flux iteration SEBAL 01. Inline coordinates
Imagery (i.*)
ParameterRaster|netradiation|Name of instantaneous net radiation raster map [W/m2]|False
ParameterRaster|soilheatflux|Name of instantaneous soil heat flux raster map [W/m2]|False
ParameterRaster|aerodynresistance|Name of aerodynamic resistance to heat momentum raster map [s/m]|False
ParameterRaster|temperaturemeansealevel|Name of altitude corrected surface temperature raster map [K]|False
ParameterNumber|frictionvelocitystar|Value of the height independent friction velocity (u*) [m/s]|0.0|None|0.32407|False
ParameterNumber|vapourpressureactual|Value of the actual vapour pressure (e_act) [KPa]|0.0|None|1.511|False
ParameterString|row_wet_pixel|Row value of the wet pixel|None|False|False
ParameterString|column_wet_pixel|Column value of the wet pixel|None|False|False
ParameterString|row_dry_pixel|Row value of the dry pixel|None|False|False
ParameterString|column_dry_pixel|Column value of the dry pixel|None|False|False
*ParameterBoolean|-c|Dry/Wet pixels coordinates are in image projection, not row/col|False
OutputRaster|output|Sensible Heat Flux
@@ -0,0 +1,11 @@
i.eb.hsebal01
Computes sensible heat flux iteration SEBAL 01.
Imagery (i.*)
ParameterRaster|netradiation|Name of instantaneous net radiation raster map [W/m2]|False
ParameterRaster|soilheatflux|Name of instantaneous soil heat flux raster map [W/m2]|False
ParameterRaster|aerodynresistance|Name of aerodynamic resistance to heat momentum raster map [s/m]|False
ParameterRaster|temperaturemeansealevel|Name of altitude corrected surface temperature raster map [K]|False
ParameterNumber|frictionvelocitystar|Value of the height independent friction velocity (u*) [m/s]|0.0|None|0.32407|False
ParameterNumber|vapourpressureactual|Value of the actual vapour pressure (e_act) [KPa]|0.0|None|1.511|False
Hardcoded|-a
OutputRaster|output|Sensible Heat Flux
13 changes: 13 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.eb.netrad.txt
@@ -0,0 +1,13 @@
i.eb.netrad
Net radiation approximation (Bastiaanssen, 1995).
Imagery (i.*)
ParameterRaster|albedo|Name of albedo raster map [0.0;1.0]|False
ParameterRaster|ndvi|Name of NDVI raster map [-1.0;+1.0]|False
ParameterRaster|temperature|Name of surface temperature raster map [K]|False
ParameterRaster|localutctime|Name of time of satellite overpass raster map [local time in UTC]|False
ParameterRaster|temperaturedifference2m|Name of the difference map of temperature from surface skin to about 2 m height [K]|False
ParameterRaster|emissivity|Name of the emissivity map [-]|False
ParameterRaster|transmissivity_singleway|Name of the single-way atmospheric transmissivitymap [-]|False
ParameterRaster|dayofyear|Name of the Day Of Year (DOY) map [-]|False
ParameterRaster|sunzenithangle|Name of the sun zenith angle map [degrees]|False
OutputRaster|output|Net Radiation
@@ -0,0 +1,10 @@
i.eb.soilheatflux
Soil heat flux approximation (Bastiaanssen, 1995).
Imagery (i.*)
ParameterRaster|albedo|Name of albedo raster map [0.0;1.0]|False
ParameterRaster|ndvi|Name of NDVI raster map [-1.0;+1.0]|False
ParameterRaster|temperature|Name of Surface temperature raster map [K]|False
ParameterRaster|netradiation|Name of Net Radiation raster map [W/m2]|False
ParameterRaster|localutctime|Name of time of satellite overpass raster map [local time in UTC]|False
ParameterBoolean|-r|HAPEX-Sahel empirical correction (Roerink, 1995)|False
OutputRaster|output|Soil Heat Flux
@@ -0,0 +1,5 @@
i.emissivity
Computes emissivity from NDVI, generic method for sparse land.
Imagery (i.*)
ParameterRaster|input|Name of NDVI raster map [-]|False
OutputRaster|output|Emissivity
12 changes: 12 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.evapo.mh.txt
@@ -0,0 +1,12 @@
i.evapo.mh
Computes evapotranspiration calculation modified or original Hargreaves formulation, 2001.
Imagery (i.*)
ParameterRaster|netradiation_diurnal|Name of input diurnal net radiation raster map [W/m2/d]|False
ParameterRaster|average_temperature|Name of input average air temperature raster map [C]|False
ParameterRaster|minimum_temperature|Name of input minimum air temperature raster map [C]|False
ParameterRaster|maximum_temperature|Name of input maximum air temperature raster map [C]|False
ParameterRaster|precipitation|Name of precipitation raster map [mm/month]|True
*ParameterBoolean|-z|Set negative ETa to zero|False
*ParameterBoolean|-h|Use original Hargreaves (1985)|False
*ParameterBoolean|-s|Use Hargreaves-Samani (1985)|False
OutputRaster|output|Evapotranspiration
12 changes: 12 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.evapo.pm.txt
@@ -0,0 +1,12 @@
i.evapo.pm
Computes potential evapotranspiration calculation with hourly Penman-Monteith.
Imagery (i.*)
ParameterRaster|elevation|Name of input elevation raster map [m a.s.l.]|False
ParameterRaster|temperature|Name of input temperature raster map [C]|False
ParameterRaster|relativehumidity|Name of input relative humidity raster map [%]|False
ParameterRaster|windspeed|Name of input wind speed raster map [m/s]|False
ParameterRaster|netradiation|Name of input net solar radiation raster map [MJ/m2/h]|False
ParameterRaster|cropheight|Name of input crop height raster map [m]|False
*ParameterBoolean|-z|Set negative ETa to zero|False
*ParameterBoolean|-n|Use Night-time|False
OutputRaster|output|Evapotranspiration
10 changes: 10 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.evapo.pt.txt
@@ -0,0 +1,10 @@
i.evapo.pt
Computes evapotranspiration calculation Priestley and Taylor formulation, 1972.
Imagery (i.*)
ParameterRaster|net_radiation|Name of input net radiation raster map [W/m2]|False
ParameterRaster|soil_heatflux|Name of input soil heat flux raster map [W/m2]|False
ParameterRaster|air_temperature|Name of input air temperature raster map [K]|False
ParameterRaster|atmospheric_pressure|Name of input atmospheric pressure raster map [millibars]|False
ParameterNumber|priestley_taylor_coeff|Priestley-Taylor coefficient|0.0|None|1.26|False
*ParameterBoolean|-z|Set negative ETa to zero|False
OutputRaster|output|Evapotranspiration
10 changes: 10 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.evapo.time.txt
@@ -0,0 +1,10 @@
i.evapo.time
Computes temporal integration of satellite ET actual (ETa) following the daily ET reference (ETo) from meteorological station(s).
Imagery (i.*)
ParameterMultipleInput|eta|Names of satellite ETa raster maps [mm/d or cm/d]|3|False
ParameterMultipleInput|eta_doy|Names of satellite ETa Day of Year (DOY) raster maps [0-400] [-]|3|False
ParameterMultipleInput|eto|Names of meteorological station ETo raster maps [0-400] [mm/d or cm/d]|3|False
ParameterNumber|eto_doy_min|Value of DOY for ETo first day|0|366|1|False
ParameterNumber|start_period|Value of DOY for the first day of the period studied|0|366|1|False
ParameterNumber|end_period|Value of DOY for the last day of the period studied|0|366|1|False
OutputRaster|output|Temporal integration
@@ -0,0 +1,7 @@
i.gensig
Generates statistics for i.maxlik from raster map.
Imagery (i.*)
ParameterRaster|trainingmap|Ground truth training map|False
ParameterMultipleInput|input|Input rasters|3|False
OutputFile|signaturefile|Signature File

@@ -0,0 +1,8 @@
i.gensigset
Generates statistics for i.smap from raster map.
Imagery (i.*)
ParameterRaster|trainingmap|Ground truth training map|False
ParameterMultipleInput|input|Input rasters|3|False
ParameterNumber|maxsig|Maximum number of sub-signatures in any class|1|None|5|True
OutputFile|signaturefile|Signature File

6 changes: 6 additions & 0 deletions python/plugins/processing/algs/grass7/description/i.group.txt
@@ -0,0 +1,6 @@
i.group
Regroup multiple mono-band rasters into a single multiband raster.
Imagery (i.*)
ParameterMultipleInput|input|Input rasters|3|False
OutputRaster|group|Multiband raster

@@ -0,0 +1,6 @@
i.image.mosaic
Mosaics several images and extends colormap.
Imagery (i.*)
ParameterMultipleInput|input|Input rasters|3|False
OutputRaster|output|Mosaic Raster

@@ -0,0 +1,7 @@
i.in.spotvgt
Imports SPOT VGT NDVI data into a raster map.
Imagery (i.*)
ParameterRaster|input|Name of input SPOT VGT NDVI HDF file|False
*ParameterBoolean|-a|Also import quality map (SM status map layer) and filter NDVI map|False
OutputRaster|output|SPOT NDVI Raster

@@ -0,0 +1,14 @@
i.landsat.acca
Performs Landsat TM/ETM+ Automatic Cloud Cover Assessment (ACCA).
Imagery (i.*)
ParameterMultipleInput|rasters|Landsat input rasters|3|False
ParameterNumber|b56composite|B56composite (step 6)|0|None|225|True
ParameterNumber|b45ratio|B45ratio: Desert detection (step 10)|0|None|1|True
ParameterNumber|histogram|Number of classes in the cloud temperature histogram|0|None|100|True
*ParameterBoolean|-5|Data is Landsat-5 TM|False
*ParameterBoolean|-f|Apply post-processing filter to remove small holes|False
*ParameterBoolean|-x|Always use cloud signature (step 14)|False
*ParameterBoolean|-2|Bypass second-pass processing, and merge warm (not ambiguous) and cold clouds|False
*ParameterBoolean|-s|Include a category for cloud shadows|False
OutputRaster|output|ACCA Raster

0 comments on commit 22794ce

Please sign in to comment.