Skip to content
Permalink
Browse files

[processing][saga] Unit tests for snap points to lines/points algs

(cherry-picked from 82364e4)
  • Loading branch information
nyalldawson committed Jul 12, 2018
1 parent 7097093 commit 9dcb4132142b19dbbac389488bf22a52d718195b
Showing with 156 additions and 0 deletions.
  1. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_moves.dbf
  2. +29 −0 python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_moves.mshp
  3. +1 −0 python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_moves.prj
  4. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_moves.shp
  5. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_moves.shx
  6. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_result.dbf
  7. +29 −0 python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_result.mshp
  8. +1 −0 python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_result.prj
  9. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_result.shp
  10. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_lines_result.shx
  11. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_moves.dbf
  12. +29 −0 python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_moves.mshp
  13. +1 −0 python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_moves.prj
  14. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_moves.shp
  15. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_moves.shx
  16. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_result.dbf
  17. +29 −0 python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_result.mshp
  18. +1 −0 python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_result.prj
  19. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_result.shp
  20. BIN python/plugins/processing/tests/testdata/expected/saga/snap_points_to_points_result.shx
  21. +36 −0 python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml
Binary file not shown.
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<SAGA_METADATA>
<HISTORY saga-version="2.3.1">
<MODULE library="shapes_points" id="19" name="Snap Points to Lines">
<OPTION type="double" id="DISTANCE" name="Search Distance">0.900000</OPTION>
<INPUT type="shapes" id="INPUT" name="Points">
<FILE>/tmp/processing_c9cffa8a29a44a6381b1e4648d0e014a/baab8e35e8b74d61b9e1be06b6303d5a/INPUT.shp</FILE>
</INPUT>
<INPUT type="shapes" id="SNAP" name="Snap Features">
<FILE>/tmp/processing_c9cffa8a29a44a6381b1e4648d0e014a/a58de6cbffc24234b5483d6a4ce9e5e7/SNAP.shp</FILE>
</INPUT>
<OUTPUT type="shapes" id="MOVES" name="Moves">INPUT [snap move: SNAP]</OUTPUT>
</MODULE>
</HISTORY>
<SOURCE>
<FILE></FILE>
<DATABASE>
<FIELDS>
<FIELD TYPE="STRING">fid</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"]]
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<SAGA_METADATA>
<HISTORY saga-version="2.3.1">
<MODULE library="shapes_points" id="19" name="Snap Points to Lines">
<OPTION type="double" id="DISTANCE" name="Search Distance">0.900000</OPTION>
<INPUT type="shapes" id="INPUT" name="Points">
<FILE>/tmp/processing_c9cffa8a29a44a6381b1e4648d0e014a/baab8e35e8b74d61b9e1be06b6303d5a/INPUT.shp</FILE>
</INPUT>
<INPUT type="shapes" id="SNAP" name="Snap Features">
<FILE>/tmp/processing_c9cffa8a29a44a6381b1e4648d0e014a/a58de6cbffc24234b5483d6a4ce9e5e7/SNAP.shp</FILE>
</INPUT>
<OUTPUT type="shapes" id="OUTPUT" name="Result">INPUT [snapped: SNAP]</OUTPUT>
</MODULE>
</HISTORY>
<SOURCE>
<FILE></FILE>
<DATABASE>
<FIELDS>
<FIELD TYPE="STRING">fid</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"]]
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<SAGA_METADATA>
<HISTORY saga-version="2.3.1">
<MODULE library="shapes_points" id="18" name="Snap Points to Points">
<OPTION type="double" id="DISTANCE" name="Search Distance">0.500000</OPTION>
<INPUT type="shapes" id="INPUT" name="Points">
<FILE>/tmp/processing_c9cffa8a29a44a6381b1e4648d0e014a/cc15847f946f404fbb7fb8baafffe3c7/INPUT.shp</FILE>
</INPUT>
<INPUT type="shapes" id="SNAP" name="Snap Features">
<FILE>/tmp/processing_c9cffa8a29a44a6381b1e4648d0e014a/e8d243d131f0456a86228224864db4fb/SNAP.shp</FILE>
</INPUT>
<OUTPUT type="shapes" id="MOVES" name="Moves">INPUT [snap move: SNAP]</OUTPUT>
</MODULE>
</HISTORY>
<SOURCE>
<FILE></FILE>
<DATABASE>
<FIELDS>
<FIELD TYPE="STRING">fid</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"]]
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<SAGA_METADATA>
<HISTORY saga-version="2.3.1">
<MODULE library="shapes_points" id="18" name="Snap Points to Points">
<OPTION type="double" id="DISTANCE" name="Search Distance">0.500000</OPTION>
<INPUT type="shapes" id="INPUT" name="Points">
<FILE>/tmp/processing_c9cffa8a29a44a6381b1e4648d0e014a/cc15847f946f404fbb7fb8baafffe3c7/INPUT.shp</FILE>
</INPUT>
<INPUT type="shapes" id="SNAP" name="Snap Features">
<FILE>/tmp/processing_c9cffa8a29a44a6381b1e4648d0e014a/e8d243d131f0456a86228224864db4fb/SNAP.shp</FILE>
</INPUT>
<OUTPUT type="shapes" id="OUTPUT" name="Result">INPUT [snapped: SNAP]</OUTPUT>
</MODULE>
</HISTORY>
<SOURCE>
<FILE></FILE>
<DATABASE>
<FIELDS>
<FIELD TYPE="STRING">fid</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"]]
Binary file not shown.
Binary file not shown.
@@ -375,3 +375,39 @@ tests:
name: expected/saga/cross_profiles.shp
type: vector

- algorithm: saga:snappointstolines
name: Snap points to lines
params:
DISTANCE: 0.9
INPUT:
name: snap_points.gml
type: vector
SNAP:
name: snap_lines.gml
type: vector
results:
MOVES:
name: expected/saga/snap_points_to_lines_moves.shp
type: vector
OUTPUT:
name: expected/saga/snap_points_to_lines_result.shp
type: vector

- algorithm: saga:snappointstopoints
name: Snap points to points
params:
DISTANCE: 0.5
INPUT:
name: snap_points.gml
type: vector
SNAP:
name: points.gml
type: vector
results:
MOVES:
name: expected/saga/snap_points_to_points_moves.shp
type: vector
OUTPUT:
name: expected/saga/snap_points_to_points_result.shp
type: vector

0 comments on commit 9dcb413

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