From b9355556c57f9d7238de7a02d024c1ddbec16c09 Mon Sep 17 00:00:00 2001 From: H Tveite Date: Tue, 6 Nov 2018 10:23:22 +0100 Subject: [PATCH] Added tests for gdal extractprojection --- .../tests/testdata/expected/gdal/dem.prj | 1 + .../tests/testdata/expected/gdal/dem.wld | 6 ++++ .../tests/testdata/gdal_algorithm_tests.yaml | 28 +++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 python/plugins/processing/tests/testdata/expected/gdal/dem.prj create mode 100644 python/plugins/processing/tests/testdata/expected/gdal/dem.wld diff --git a/python/plugins/processing/tests/testdata/expected/gdal/dem.prj b/python/plugins/processing/tests/testdata/expected/gdal/dem.prj new file mode 100644 index 00000000000..a30c00a55de --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/gdal/dem.prj @@ -0,0 +1 @@ +GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/expected/gdal/dem.wld b/python/plugins/processing/tests/testdata/expected/gdal/dem.wld new file mode 100644 index 00000000000..b603f023ece --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/gdal/dem.wld @@ -0,0 +1,6 @@ +0.00010000 +0.00000000 +0.00000000 +-0.00010000 +18.66634794 +45.81165144 diff --git a/python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml b/python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml index 34f45723ffd..45eba8a19eb 100644 --- a/python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml +++ b/python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml @@ -122,6 +122,34 @@ tests: name: expected/gdal/contour.gml type: vector + - algorithm: gdal:extractprojection + name: Extract Projection (extractprojection) + params: + INPUT: + name: dem.tif + type: raster + PRJ_FILE_CREATE: True + results: + WORLD_FILE: + name: expected/gdal/dem.wld + type: file + PRJ_FILE: + name: expected/gdal/dem.prj + type: file + + - algorithm: gdal:extractprojection + name: Extract Projection (extractprojection) + params: + INPUT: + name: dem.tif + type: raster + PRJ_FILE_CREATE: False + results: + WORLD_FILE: + name: expected/gdal/dem.wld + type: file + PRJ_FILE: None + - algorithm: gdal:gdalinfo name: gdalinfo params: