2

I'm currently writing a python plugin where I would like user with 0 experience of GIS to use QGIS to view data geographically anyhow,

I'm running two processing functions:

import processing
processing.runandload('qgis:reprojectlayer', str(self.input_file_path) + "shapefiles/temp.shp",'EPSG:4326', file_name + '.shp')
processing.runandload("grass:v.voronoi", file_name+".shp",False, True, extent, -1, 0, 3, file_name_poly)

Both of them are adding the new layer in qgis "Layers Panel", can I turn this off? (and just saving the files in the selected path). Now I got one layer called Reprojected and one called Voronoi Polygons in the Layer Panel.

2
  • You mean turn off visibility or you want to do changes on same shape files ?
    – Shiko
    Commented Aug 3, 2016 at 4:59
  • I don't want them to appear in the layer list, sorry for being unclear!
    – axel_ande
    Commented Aug 3, 2016 at 9:07

1 Answer 1

3

You can replace the runandload function with runalg if you don't want the output to be shown. So your code will look like:

import processing
processing.runalg('qgis:reprojectlayer', str(self.input_file_path) + "shapefiles/temp.shp",'EPSG:4326', file_name + '.shp')
processing.runalg("grass:v.voronoi", file_name+".shp",False, True, extent, -1, 0, 3, file_name_poly)
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.