Skip to content

Commit

Permalink
[processing] restore buffer algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Oct 11, 2017
1 parent bba509e commit 98dfda3
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 195 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/gdal/GdalAlgorithmProvider.py
Expand Up @@ -73,6 +73,7 @@
# from .gdalcalc import gdalcalc
# from .rasterize_over import rasterize_over

from .Buffer import Buffer
from .OffsetCurve import OffsetCurve
from .ogrinfo import ogrinfo
from .OgrToPostGis import OgrToPostGis
Expand All @@ -82,7 +83,6 @@
# from .ogr2ogrclip import Ogr2OgrClip
# from .ogr2ogrclipextent import Ogr2OgrClipExtent
# from .ogr2ogrtopostgislist import Ogr2OgrToPostGisList
# from .ogr2ogrbuffer import Ogr2OgrBuffer
# from .ogr2ogrdissolve import Ogr2OgrDissolve
# from .onesidebuffer import OneSideBuffer
# from .ogr2ogrtabletopostgislist import Ogr2OgrTableToPostGisList
Expand Down Expand Up @@ -175,6 +175,7 @@ def loadAlgorithms(self):
# gdalcalc(),
# rasterize_over(),
# ----- OGR tools -----
Buffer(),
OffsetCurve(),
ogrinfo(),
OgrToPostGis(),
Expand All @@ -183,7 +184,6 @@ def loadAlgorithms(self):
# Ogr2OgrClip(),
# Ogr2OgrClipExtent(),
# Ogr2OgrToPostGisList(),
# Ogr2OgrBuffer(),
# Ogr2OgrDissolve(),
# OneSideBuffer(),
# Ogr2OgrTableToPostGisList(),
Expand Down
137 changes: 0 additions & 137 deletions python/plugins/processing/algs/gdal/ogr2ogrbuffer.py

This file was deleted.

112 changes: 56 additions & 56 deletions python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml
Expand Up @@ -489,6 +489,62 @@ tests:
geometry:
precision: 7

- algorithm: gdal:buffervectors
name: Buffer lines
params:
DISSOLVEALL: false
DISTANCE: 1.0
GEOMETRY: geometry
INPUT_LAYER:
name: lines.gml
type: vector
MULTI: false
results:
OUTPUT_LAYER:
name: expected/gdal/buffer_lines.gml
type: vector
compare:
geometry:
precision: 7
expectedFailure:
- int(1)

- algorithm: gdal:buffervectors
name: Basic polygon buffer
params:
DISSOLVEALL: false
DISTANCE: 0.5
GEOMETRY: geometry
INPUT_LAYER:
name: polys.gml
type: vector
MULTI: false
results:
OUTPUT_LAYER:
name: expected/gdal/buffer_polys.gml
type: vector
compare:
geometry:
precision: 7

- algorithm: gdal:buffervectors
name: Polygon buffer with dissolve
params:
DISSOLVEALL: true
DISTANCE: 0.5
GEOMETRY: geometry
INPUT_LAYER:
name: polys.gml
type: vector
MULTI: false
results:
OUTPUT_LAYER:
name: expected/gdal/buffer_polys_dissolve.gml
type: vector
compare:
geometry:
precision: 7

# - algorithm: gdal:singlesidedbufferforlines
# name: One-side buffer for lines (left-handed)
# params:
Expand All @@ -508,59 +564,3 @@ tests:
# geometry:
# precision: 7
#
# - algorithm: gdal:buffervectors
# name: Buffer lines
# params:
# DISSOLVEALL: false
# DISTANCE: 1.0
# GEOMETRY: geometry
# INPUT_LAYER:
# name: lines.gml
# type: vector
# MULTI: false
# results:
# OUTPUT_LAYER:
# name: expected/gdal/buffer_lines.gml
# type: vector
# compare:
# geometry:
# precision: 7
# expectedFailure:
# - int(1)
#
# - algorithm: gdal:buffervectors
# name: Basic polygon buffer
# params:
# DISSOLVEALL: false
# DISTANCE: 0.5
# GEOMETRY: geometry
# INPUT_LAYER:
# name: polys.gml
# type: vector
# MULTI: false
# results:
# OUTPUT_LAYER:
# name: expected/gdal/buffer_polys.gml
# type: vector
# compare:
# geometry:
# precision: 7
#
# - algorithm: gdal:buffervectors
# name: Polygon buffer with dissolve
# params:
# DISSOLVEALL: true
# DISTANCE: 0.5
# GEOMETRY: geometry
# INPUT_LAYER:
# name: polys.gml
# type: vector
# MULTI: false
# results:
# OUTPUT_LAYER:
# name: expected/gdal/buffer_polys_dissolve.gml
# type: vector
# compare:
# geometry:
# precision: 7
#

0 comments on commit 98dfda3

Please sign in to comment.