Tag Info

New answers tagged

0

You can do that from the QGIS Python console in this way: Copy the next function, taken (and slightly adapted) from the Processing framework source code, into the QGIS Python console: from processing.core.Processing import Processing from processing.gui.AlgorithmDialog import AlgorithmDialog def runAlgorithm(alg): """ Borrowed from CommanderWindow.py, ...


0

You can use the following script (save it in Processing Toolbox > Scripts > Tools > Create new script) in the graphical modeler to copy the first row of attributes and apply it to each feature in the input layer. (Unfortunately I was unable to add a filter for your required fields so hopefully others can provide a solution which completely answers your ...


1

I found that when SAGA didn't appear in my processing toolbox (even though it was activated) the problem was the address that appeared for the SAGA folder in the: PROCESSING tab under OPTIONS then PROVIDERS then SAGA. You need to find where the SAGA FOLDER has been saved on your PC and make sure that the address in this tab matches the folder address.


3

The problem has a few days ago been solved in QGIS master. I have prepared a patch for QGIS 2.10 but I hope that the QGIS developers will backport it. Since only Python changes are involved, an existing installation can now be easily fixed without having to reinstall everything.


1

I've solved the issue by a "manual workaround": after having the output order completely messed up by the graphical modeler I manually swapped the coefficients of the alternatives calculated by the model and changed the names of the metadata, and the outputs (ex. alt_3 became alt_0; alt_4 became alt_1 and so on...). Now the end, everything is in the correct ...


1

I try to do this in my Multi Ring Buffer Plugin, but there is probably a more elegant solution. This is done after getting a selected layer and applying the selected layers CRS, through the AuthID, to a newly created layer. If the AuthID is not recognised, QGIS prompts for a valid one. # Check the current CRS of active layer buffer_crs_object = ...


1

Thanks to Ujaval gandhi from qgistutorials, he prepared a python script to be run inside the modeler that solves the problem, here is the tutorial that Ujaval made for everyone. http://www.qgistutorials.com/en/docs/processing_python_scripts.html


0

You may need to upgrade your version of QGIS. From what I can gather, versions of QGIS before 2.6.0 had an issue where extra GDAL parameters passed to the processing plugin were quoted in a way that GDAL wouldn't recognise them. (We've had to work around this issue ourselves as we can't upgrade our version of QGIS. Our workaround is to build our own GDAL ...


0

Check if your graph contains the points you later want to find using findVertex. According to http://qgis.org/api/qgsgraph_8cpp_source.html, the routing graph has to contain the exact point: 72 int QgsGraph::findVertex( const QgsPoint& pt ) const 73 { 74 int i = 0; 75 for ( i = 0; i < mGraphVertexes.size(); ++i ) 76 { 77 if ( ...


1

I ended up writing a small module to extract information out of the string that source() returns: import re class LayerDbInfo: def __init__(self, layerInfo): if layerInfo[:6] == 'dbname': layerInfo = layerInfo.replace('\'','"') vals = dict(re.findall('(\S+)="?(.*?)"? ',layerInfo)) self.dbName = ...


1

Yes and you can automate this process with python grass.script or bash script (bat script in Windows). I test it in my system and the individual commands are (for my line vector named route and raster dem named utah_demUTM2): v.to.rast input=route value=1 output=route_raster r.thin input=route_raster output=route_raster_thin r.mapcalc ...


2

Just to add to the earlier answer... You can find the field for the path here - Processing > Options > Providers > SAGA > SAGA Folder:



Top 50 recent answers are included