Skip to content
Permalink
Browse files

[processing][saga] Fix definition of cross profiles alg, add test

  • Loading branch information
nyalldawson committed Jun 16, 2018
1 parent 312c901 commit 8323462f3b0aee9577a9712c67ca8efcad68b4e5
@@ -4,5 +4,5 @@ QgsProcessingParameterRasterLayer|DEM|DEM|None|False
QgsProcessingParameterFeatureSource|LINES|Lines|1|None|False
QgsProcessingParameterNumber|DIST_LINE|Profile Distance|QgsProcessingParameterNumber.Double|10.0|False|0.0|None
QgsProcessingParameterNumber|DIST_PROFILE|Profile Length|QgsProcessingParameterNumber.Double|10.0|False|0.0|None
QgsProcessingParameterNumber|NUM_PROFILE|Profile Samples|QgsProcessingParameterNumber.Double|10.0|False|1.0|None
QgsProcessingParameterNumber|NUM_PROFILE|Profile Samples|QgsProcessingParameterNumber.Integer|10|False|3|None
QgsProcessingParameterVectorDestination|PROFILES|Cross Profiles
Binary file not shown.
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<SAGA_METADATA>
<HISTORY saga-version="2.3.1">
<MODULE library="ta_profiles" id="3" name="Cross Profiles">
<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.7767514376</YMIN>
<YMAX>45.8116514376</YMAX>
</OPTION>
<OPTION type="double" id="DIST_LINE" name="Profile Distance">0.001000</OPTION>
<OPTION type="double" id="DIST_PROFILE" name="Profile Length">0.002000</OPTION>
<OPTION type="integer" id="NUM_PROFILE" name="Profile Samples">10</OPTION>
<INPUT type="grid" id="DEM" name="DEM" 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/dem.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</OUTPUT>
</MODULE>
</INPUT>
<INPUT type="shapes" id="LINES" name="Lines">
<FILE>/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/custom/lines_over.shp</FILE>
</INPUT>
<OUTPUT type="shapes" id="PROFILES" name="Cross Profiles">Profiles</OUTPUT>
</MODULE>
</HISTORY>
<SOURCE>
<FILE></FILE>
<DATABASE>
<FIELDS>
<FIELD TYPE="INTEGER">ID</FIELD>
<FIELD TYPE="INTEGER">LINE</FIELD>
<FIELD TYPE="INTEGER">PART</FIELD>
<FIELD TYPE="DOUBLE">X000</FIELD>
<FIELD TYPE="DOUBLE">X001</FIELD>
<FIELD TYPE="DOUBLE">X002</FIELD>
<FIELD TYPE="DOUBLE">X003</FIELD>
<FIELD TYPE="DOUBLE">X004</FIELD>
<FIELD TYPE="DOUBLE">X005</FIELD>
<FIELD TYPE="DOUBLE">X006</FIELD>
<FIELD TYPE="DOUBLE">X007</FIELD>
<FIELD TYPE="DOUBLE">X008</FIELD>
<FIELD TYPE="DOUBLE">X009</FIELD>
</FIELDS>
</DATABASE>
<PROJECTION></PROJECTION>
</SOURCE>
<DESCRIPTION></DESCRIPTION>
</SAGA_METADATA>
@@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
Binary file not shown.
Binary file not shown.
@@ -358,3 +358,20 @@ tests:
name: expected/saga/polygon_self_intersection.shp
type: vector

- algorithm: saga:crossprofiles
name: Cross profiles
params:
DEM:
name: dem.tif
type: raster
DIST_LINE: 0.001
DIST_PROFILE: 0.002
LINES:
name: custom/lines_over.shp
type: vector
NUM_PROFILE: 10
results:
PROFILES:
name: expected/saga/cross_profiles.shp
type: vector

0 comments on commit 8323462

Please sign in to comment.
You can’t perform that action at this time.