Skip to content

Commit

Permalink
[processing][saga] Add unit test for point distances alg
Browse files Browse the repository at this point in the history
(cherry picked from commit 4212dea)
  • Loading branch information
nyalldawson committed Dec 4, 2018
1 parent 3272950 commit 5bd63c7
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
Binary file not shown.
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<SAGA_METADATA>
<HISTORY saga-version="2.3.1">
<MODULE library="shapes_points" id="3" name="Point Distances">
<OPTION type="table_field" id="ID_POINTS" name="Identifier" index="0">fid</OPTION>
<OPTION type="choice" id="FORMAT" name="Output Format" index="1">each pair with a single record</OPTION>
<OPTION type="double" id="MAX_DIST" name="Maximum Distance">0.000000</OPTION>
<INPUT type="shapes" id="POINTS" name="Points">
<FILE>/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/custom/points.shp</FILE>
</INPUT>
<OUTPUT type="table" id="DISTANCES" name="Distances">Distances [points]</OUTPUT>
</MODULE>
</HISTORY>
<SOURCE>
<FILE>/home/nyall/dev/QGIS/python/plugins/processing/tests/testdata/expected/saga/point_distances.dbf</FILE>
<DATABASE>
<FIELDS>
<FIELD TYPE="STRING">ID_POINT</FIELD>
<FIELD TYPE="STRING">ID_NEAR</FIELD>
<FIELD TYPE="DOUBLE">DISTANCE</FIELD>
</FIELDS>
</DATABASE>
<PROJECTION>
<OGC_WKT>GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]</OGC_WKT>
<PROJ4>+proj=longlat +a=6378137.000000 +b=6356752.314245 +no_defs</PROJ4>
<EPSG>-1</EPSG>
</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"]]
14 changes: 14 additions & 0 deletions python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml
Expand Up @@ -486,3 +486,17 @@ tests:
hash: 6f81c858fc7575eaff6258b6e75bf4427d0568d5134837523b730929
type: rasterhash

- algorithm: saga:pointdistances
name: Point distances
params:
FORMAT: 1
ID_POINTS: fid
MAX_DIST: 0.0
POINTS:
name: custom/points.shp
type: vector
results:
DISTANCES:
name: expected/saga/point_distances.dbf
type: vector

0 comments on commit 5bd63c7

Please sign in to comment.