0

I'm using the Visibility Analysis plugin (although the same issue would apply in other case) and want to run the viewshed by iterating over the features in my input table.

This works fine and I can set the output path to, for example, "C:\test\output.tif" and it creates output files called output_0.tif, output_1.tif.

Is it possible to use one of the columns in the input file for the filename instead?

For reference, the python code that is will run is:

processing.run("visibility:viewshed", {'ANALYSIS_TYPE':0,'OBSERVER_POINTS':QgsProcessingFeatureSourceDefinition('PointZ?crs=EPSG:27700&field=ID:string(255,0)&field=observ_hgt:double(10,4)&field=radius:double(10,2)&uid={8d83d775-3c71-4409-84a1-921d5af17230}', selectedFeaturesOnly=False, featureLimit=-1, flags=QgsProcessingFeatureSourceDefinition.FlagCreateIndividualOutputPerInputFeature, geometryCheck=QgsFeatureRequest.GeometryAbortOnInvalid),'DEM':'C:/test/combined.tif','USE_CURVATURE':False,'REFRACTION':0.13,'OPERATOR':0,'OUTPUT':'C:/test/output.tif'})

"'DEM': 'C:/test/combined.tif'" is the source file for the digital elevation model. The issue is how I add the value from the column "fid" to the bit 'OUTPUT':'C:/test/output.tif' Dialog box

1
  • What is the input file within that code you posted? All I am seeing is 'DEM': 'C:/test/combined.tif'.
    – Binx
    Jun 23 at 14:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.