Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL Buffer Vectors; not possible to provide negative buffer distance #46667

Closed
2 tasks
MarByteBeep opened this issue Dec 31, 2021 · 2 comments · Fixed by #46717
Closed
2 tasks

GDAL Buffer Vectors; not possible to provide negative buffer distance #46667

MarByteBeep opened this issue Dec 31, 2021 · 2 comments · Fixed by #46717
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@MarByteBeep
Copy link

What is the bug or the crash?

The Buffer Distance field in Toolbox -> GDAL -> Buffer Vectors cannot be set to a negative value in the UI. However the tool itself (ogr2ogr) IS able to handle negative values properly.

Steps to reproduce the issue

  • Open Toolbox -> GDAL -> Buffer Vectors
  • Enter negative value in Buffer Distance field
  • Observe it being set to 0.000

Versions

QGIS version
3.22.2-Białowieża
QGIS code revision
1601ec4
Qt version
5.15.2
Python version
3.9.5
GDAL/OGR version
3.4.0
PROJ version
8.2.0
EPSG Registry database version
v10.038 (2021-10-21)
GEOS version
3.10.0-CAPI-1.16.0
SQLite version
3.35.2
PDAL version
2.3.0
PostgreSQL client version
13.0
SpatiaLite version
5.0.1
QWT version
6.1.3
QScintilla2 version
2.11.5
OS version
Windows 10 Version 2009

Active Python plugins
BGTImport
3.16
inspireNL
2.6
QuickOSM
2.0.0
quick_map_services
0.19.27
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.5
processing
2.12.99
sagaprovider
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@MarByteBeep MarByteBeep added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Dec 31, 2021
@gioman gioman added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Dec 31, 2021
@gioman gioman self-assigned this Dec 31, 2021
@baswein
Copy link
Contributor

baswein commented Jan 1, 2022

I tried this on widows in both 3.16 and 3.22 and both set the value back to 0 when entering a negative number. The native qgis buffer worked with negative numbers. I see that the distance minValue in C:\OSGeo4W64\apps\qgis-ltr\python\plugins\processing\algs\gdal\Buffer.py is set to zero. If I change it to -10000 I can use negative numbers and the algorithm works. Is there a reason that it is set to 0?

@MarByteBeep
Copy link
Author

Awesome. Tnx!

alexbruy added a commit that referenced this issue Jan 6, 2022
[Backport release-3_22] allow negative values for buffer distance in GDAL buffer algorithm (fix #46667)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants