This is the code:
import processing file1= QgsVectorLayer("/qgis_data/file1.shp", "file1", "ogr") file2= QgsVectorLayer("/qgis_data/file2.shp", "file2", "ogr") inte=processing.runAndLoadResults("saga:intersect", file1, file2)
But it gives:
TypeError: argument of type 'QgsVectorLayer' is not iterable and if i skip it and proceed to the next part where I have to do a dissolve.
dissolved=QgsGeometryAnalyzer().dissolve(inte, "test_dissolved.shp", onlySelectedFeatures=False, uniqueIdField=-1, p=None
NameError: name 'QgsGeometryAnalyzer' is not defined
(of course i have tried other variable since
inte didn't exist- i used one of the files).
There are also functions that have changed in QGIS3 where I am working with and I have replaced as much as I could find on the internet. But these problems remain(the dissolve one for example has changed but can't find the new one).
Can you tell how to solve the problems and make the code work?