Thursday 23 May 2019

qgis - Fixed buffers and interior buffers are not working for a polygon that contains a hole


I'm following the online qgis manual available on qgis website. I'm doing the step 21.11.3. (http://docs.qgis.org/2.14/en/docs/training_manual/answers/answers.html#complete-analysis-3).


To make it simple : I have a raster converted to vector, so now it is a polygon (several polygons). I'm doing an interior buffer exactly how it is described in the manual. I didn't obtain the same result. I can see the interior buffer just in some polygons, not in all of them ->


enter image description here


The interior buffers appear just for those polygons, that don't contain a hole. I use qgis 2.18.3.



This is how i created the interior buffer ->


enter image description here


In green you see the input layer : suitable_terrain, in blue the output layer, the interior buffer.


It is not a problem of a projection. I use WGS84 UTM Zone 34S where the units are in meters. I did also the Check validity and i obtain the same result.



Answer



I tested the Processing toolbox -> QGIS geoalgorithms -> Vector geometry tools -> -> Fixed distance buffer on a polygon shapefile that has holes, as in your case, and I have got the same result that polygons with holes are not considered for interior buffers of -100 m distance.


enter image description here


Here is the output:


enter image description here


However, when I used the buffer vectors located under Processing toolbox -> GDAL/OGR -> [OGR] Geoprocessing -> Buffer vectors, I got the correct result that you want of distace of -100 m, as you can see below:



enter image description here


Here is the output:


enter image description here


I noticed that the buffer shape is different between the two results, but it is more accurate in [OGR] Buffer vectorstool than in QGIS Fixed distance buffer tool.


You need to use Processing toolbox -> GDAL/OGR -> [OGR] Geoprocessing -> Buffer vectors in your analysis.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...