Tag Info

New answers tagged

1

Here is a way to set a primitive progress bar. Design is based on example you can found within the PyQgis Dev. Cookbook (see section 11.2) Example is designed to work with features of a QgsVectorLayer but it shows the main steps you could adapt for your process algo. The key to your problem is to find a way to evaluate the progression of your algo within ...


0

Is it possible that you need to use srcnodata along with dstnodata for your tif? If nodata happens to be undefined in your source, it's not going to know what to set as nodata in your destination without that flag. That's worked for me in the past...though in my case I'm using srcnodata and dstalpha instead.


1

GDALTools are a core plugin of QGIS, and will be installed by default. If you are missing some parts of the Vector, Raster or Processing menu, please add a screenshot.


4

You can start with the top left corner of the map canvas and add some offset if you like. iface.mapCanvas().mapToGlobal( QPoint( 0, 0 ) )


2

There are two things you will need to do in python in order to solve this problem Calculating the values There is no support for aggregate expressions in QGIS, so you will have to resort to implementing your own logic with python. You can do the following: Use QgsVectorLayer.maximumValue( fieldIndex ) if you just need the maximum value of a given field. ...


2

I couldn't find the field count in the fTools anymore (QGIS 2.0). But I managed to get the number of lines within a polygon using the plugin MMQGIS. Assuming you have a line layer test.shp and a polygonlayer buffers.shp you have to do the following: Choose MMQGIS > Combine > Spatial Join Select the parameters: Output Shape (Target) Layer: ...


0

I had similar weird behavior with QGIS 2.4 . I am guessing that it as something to do with multithreading introduction in 2.4. It can affect the execution order. It may explain the WHY part of your question.


1

Following that super blog post http://www.lutraconsulting.co.uk/blog/2014/07/06/qgis-layer-tree-api-part-1/ I will be able to sort manually my layers/groups using layerTreeRoot and moving nodes at the right position. Not as straight forward, but it should work. Here a snippet for moving one node (a group in this case) self.treeRoot = ...


0

So this is the answer. I guess this can be cause by the introduction of multithreading in 2.4. def on_loadFinished(self): self.ui.webViewResult.page().mainFrame().addToJavaScriptWindowObject("QGISInterface", self.moTAZJsInterface) def init_Clicked(self,iface): self.ui.webViewResult.loadFinished.connect(self.on_loadFinished) ...


2

If it's just one additional information for each layer, maybe you could pass it through the metadata. In other case, if there are different informations for each feature in the layer you could join an attribute table.


0

Ok, I tried around a little more and it only works fine if I select the layers from the file system instead of the open layers table.


0

Installing the standalone installer worked for me (winGRASS 6.4 standalone installer) http://grass.osgeo.org/grass64/binary/mswindows/native/WinGRASS-6.4.4-1-Setup.exe


0

Alguno de los plugins instalados desde el repositorio oficial te está dando problemas. En mi caso fue el 'MetaSearch'. Para averiguarlo fui a la carpeta /home/felix/.qgis2/python/plugins, moví todo los plugins a otra temporal y luego fui uno a uno colocándolos y probando el qgis Google Translation: Some of the plugins installed from the official ...


0

You should include "source_id" and "target_id" values in "ids" value. So, could you try to change "ids" value from "7,8,11" to "2,7,8,11,12"? I will try to think about reporting error message in this case.


2

You can get a list of items in the composition with the items() method, and then test the item type using type(), so something along these lines should work: maps = [item for item in composition.items() if item.type() == QgsComposerItem.ComposerMap] To be exact, you may want to use: maps = [item for item in composition.items() if item.type() == ...


2

QgsMapToolEmitPoint implements the method canvasPressEvent while QgsMapToolAddFeature implements the method canvasReleaseEvent to trigger its actions. CanvasPressEvent is called before canvasReleaseEvent so if you replace the maptool in the first method, the second one will be called on the new map tool. I would recommend to create a new map tool that does ...


0

I'm writing a pyqgis 2.2 plugin with qgis 2.2 I succeeded in accessing and displaying vector data (geometries & attributes). I succeed also to create a 'beforecomitechanges' signal ( emitted, before changes are commited to the data provider). Thus a message has appeared into qgis logwindow ("comit change" label) after editing operations and before ...



Top 50 recent answers are included