작성
·
155
0
import processing
def buffer(input, distance, output):
result = processsing.run("native:buffer",{
"INPUT" : input,
"DISTANCE" : distance,
"OUTPUT" : output
}
)
return result['OUTPUT']
path = r"D:\gis_ex\qgis_ex\food.shp"
food_layer = QgsVectorLayer(path, "good_food", "ogr")
path_output = r"D:\gis_ex\qgis_ex\food_buffer.shp"
layer = buffer(food_layer, 1000.0, path_output)
답변