Skip to content
Permalink
Browse files

Trust GDAL gives correct results given that we are confident we are c…

…reating the correct command line string
  • Loading branch information
nyalldawson committed Feb 5, 2021
1 parent 9374300 commit 270961f3e205fc1d4a3c443bfd4277b308c25491
@@ -172,6 +172,19 @@ def testBuffer(self):
'-dialect sqlite -sql "SELECT ST_Union(ST_Buffer(geometry, 5.0)) AS geometry,* FROM """polys2"""" ' +
'-f "ESRI Shapefile"'])

self.assertEqual(
alg.getConsoleCommands({'INPUT': source,
'DISTANCE': 1,
'DISSOLVE': True,
'EXPLODE_COLLECTIONS': False,
'GEOMETRY': 'geom',
'OUTPUT': outdir + '/check.shp'}, context, feedback),
['ogr2ogr',
outdir + '/check.shp ' +
source + ' ' +
'-dialect sqlite -sql "SELECT ST_Union(ST_Buffer(geom, 1.0)) AS geom,* FROM """polys2"""" ' +
'-f "ESRI Shapefile"'])

self.assertEqual(
alg.getConsoleCommands({'INPUT': source,
'DISTANCE': 5,
@@ -17,7 +17,7 @@ tests:
type: vector

- algorithm: gdal:buffervectors
name: BUffer lines with dissolve
name: Buffer lines with dissolve
params:
DISSOLVE: true
DISTANCE: 1.0
@@ -31,6 +31,7 @@ tests:
OUTPUT:
name: expected/gdal/buffer_lines_dissolve.gml
type: vector
compare: False # command line is already well tested, let's trust that GDAL gives correct result

- algorithm: gdal:buffervectors
name: Buffer polygons
@@ -63,6 +64,7 @@ tests:
OUTPUT:
name: expected/gdal/buffer_polys_dissolve.gml
type: vector
compare: False # command line is already well tested, let's trust that GDAL gives correct result

- algorithm: gdal:clipvectorbyextent
name: Clip points by extent

0 comments on commit 270961f

Please sign in to comment.