mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing][SAGA] Fix output type of Zonal Grid Stats alg
and add unit test Fixes #20815
This commit is contained in:
parent
1ff3ddc61c
commit
c7cb5a8e3b
@ -5,4 +5,4 @@ QgsProcessingParameterMultipleLayers|CATLIST|Categorial Grids|3|None|True
|
||||
QgsProcessingParameterMultipleLayers|STATLIST|Grids to analyze|3|None|True
|
||||
QgsProcessingParameterRasterLayer|ASPECT|Aspect|None|True
|
||||
QgsProcessingParameterBoolean|SHORTNAMES|Short Field Names|True
|
||||
QgsProcessingParameterVectorDestination|OUTTAB|Zonal Statistics
|
||||
QgsProcessingParameterVectorDestination|OUTTAB|Zonal Statistics|5
|
||||
|
BIN
python/plugins/processing/tests/testdata/expected/saga/zonal_grid_stats.dbf
vendored
Normal file
BIN
python/plugins/processing/tests/testdata/expected/saga/zonal_grid_stats.dbf
vendored
Normal file
Binary file not shown.
41
python/plugins/processing/tests/testdata/expected/saga/zonal_grid_stats.mtab
vendored
Normal file
41
python/plugins/processing/tests/testdata/expected/saga/zonal_grid_stats.mtab
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<SAGA_METADATA>
|
||||
<HISTORY saga-version="2.3.1">
|
||||
<MODULE library="statistics_grid" id="5" name="Zonal Grid Statistics">
|
||||
<OPTION type="grid_system" id="PARAMETERS_GRID_SYSTEM" name="Grid system">
|
||||
<CELLSIZE>0.0001</CELLSIZE>
|
||||
<XMIN>18.666347944200002</XMIN>
|
||||
<XMAX>18.7035479442</XMAX>
|
||||
<YMIN>45.7767515809</YMIN>
|
||||
<YMAX>45.8116515809</YMAX>
|
||||
</OPTION>
|
||||
<OPTION type="boolean" id="SHORTNAMES" name="Short Field Names">TRUE</OPTION>
|
||||
<INPUT type="grid" id="ZONES" name="Zone Grid" system="PARAMETERS_GRID_SYSTEM">
|
||||
<MODULE library="io_gdal" id="0" name="Import Raster">
|
||||
<OPTION type="file" id="FILES" name="Files">"/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/custom/dem_boolean.tif"</OPTION>
|
||||
<OPTION type="text" id="SELECTION" name="Select from Multiple Bands"/>
|
||||
<OPTION type="boolean" id="SELECT_SORT" name="Alphanumeric Sorting">TRUE</OPTION>
|
||||
<OPTION type="boolean" id="TRANSFORM" name="Transformation">TRUE</OPTION>
|
||||
<OPTION type="choice" id="RESAMPLING" name="Resampling" index="3">B-Spline Interpolation</OPTION>
|
||||
<OUTPUT type="grid_list" id="GRIDS" name="Grids">dem_boolean</OUTPUT>
|
||||
</MODULE>
|
||||
</INPUT>
|
||||
<OUTPUT type="table" id="OUTTAB" name="Zonal Statistics">Zonal Statistics</OUTPUT>
|
||||
</MODULE>
|
||||
</HISTORY>
|
||||
<SOURCE>
|
||||
<FILE>/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/expected/saga/zonal_grid_stats.dbf</FILE>
|
||||
<DATABASE>
|
||||
<FIELDS>
|
||||
<FIELD TYPE="INTEGER">demboolean</FIELD>
|
||||
<FIELD TYPE="INTEGER">Count UCU</FIELD>
|
||||
</FIELDS>
|
||||
</DATABASE>
|
||||
<PROJECTION>
|
||||
<OGC_WKT>GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]</OGC_WKT>
|
||||
<PROJ4>+init=epsg:4326 +proj=longlat +a=6378137.000000 +b=6356752.314245 +no_defs</PROJ4>
|
||||
<EPSG>-1</EPSG>
|
||||
</PROJECTION>
|
||||
</SOURCE>
|
||||
<DESCRIPTION></DESCRIPTION>
|
||||
</SAGA_METADATA>
|
@ -552,3 +552,15 @@ tests:
|
||||
- db2c282835706e4320e7c59d86c28d930b35433ec57af70e35a325d5
|
||||
- 9caba3703fd59f99466c0bf37054826d328d1349cfe03f171655adf6
|
||||
type: rasterhash
|
||||
|
||||
- algorithm: saga:zonalrasterstatistics
|
||||
name: Zonal grid statistics
|
||||
params:
|
||||
ZONES:
|
||||
name: custom/dem_boolean.tif
|
||||
type: raster
|
||||
results:
|
||||
OUTTAB:
|
||||
name: expected/saga/zonal_grid_stats.dbf
|
||||
type: vector
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user