New answers tagged

1

It's a core plugin, so, it's already installed. You just need to look for it using the translated name.... Your QGIS is in Spanish, use the spanish translation of "Shortest" to find it.


0

Not sure about connecting your plugin to the Python Console but you could just incorporate your script inside your plugin so that it can be executed from the interface. For example, if you have a push button with the objectName pushButton, you could add the following to your plugin_name.py file: def script(): # your_code self.dockwidget.pushButton....


2

I completely uninstalled all the QGIS I could find on my computer and then reinstalled the 64bit version of QGIS 2.8.9 stable release. Once I had done that the plugin worked properly. I think this problem either relates to have remains of more than one verison of QGIS on the computer, or it was a 32bit issue. The plugin works perfectly and is brilliant.


0

Try using the following: from PyQt4.QtGui import QDockWidget, QToolBar main_window = iface.mainWindow() # To get "Panels" (in fact, we echoed their title) print([i.windowTitle() for i in main_window.findChildren(QDockWidget)]) # To get "Toolbars" (in fact, we echoed their title) print([i.windowTitle() for i in main_window.findChildren(QToolBar)]) # If ...


1

Just now only I find that while reading a line from a text file, \n will be there at the right end. I checked that value which was read from text file by using 'print' command. In print command, the \n is not displayed a character. Hence I confused. Now the problem has been solved by using rstrip() function.


1

There's a couple of methods which I use (note that it may not be the most efficient solution): (using Combo Box) - Add the following line before you populate your combo box: self.dockwidget.comboBox.clear() Then when you add a new layer, close your plugin and open it again, the combo box should be re-populated with the new additions. (using ...


2

Not sure if there is a plugin for this but you could run the following code in your Python Console which: Creates a new memory layer (you can define the type and crs). Iterates through each layer in the ToC and adds the attribute fields. Fetches all selected features in each layer and writes it to the memory layer. Saves the memory layer as a shapefile (...


2

Tried this just now and it seems to work. See below. I've tried this with both float and integer rasters (QGIS 2.14.3, Plugin version 1.4). I used gdal contour to generate the contours, though. In QGIS this is under Raster > Extraction > Contour. You might want to try that too. There's a few times this has happened to me, these are the things I usually ...


0

No, SCP can only perform DOS for Sentinel2 and Landsat 7/8 as of now.


0

R would best suit your requirement.Try the below and experiment with it. #Load rgdal library library(rgdal) #Load the shapefile specifying path in dsn and file name for layer world_layer<-readOGR(dsn="C:/SampleData",layer="world_borders") #Describe the columns of the layer summary(world_layer) #Plot using spplot library with column values categorized ...


2

Could be a problem of the development branch of debian. Its meant for developers that will test and search for possible bugs like that one might be. You could install Qgis from the offical Qgis repository and see if it delivers the correct modules and works. In general i would stay with the stable or at least testing release if i donĀ“t want to fix those ...


1

After asking to 3liz team they explain me that this feature is for next release. So I will try to build real processing provider plugin but I will also try installing dev build to see if i can try this new feature.


0

I worked it out this morning - simple user error I had asked QGIS to look in the QGIS toolbox instead of lastools folder (Essentially I had gone layer to deep, thinking that I was wanting to look at the QGIS toolbox , however it looks at other files not just the QGIS toolbox)


1

Since RoadGraph is older than virtual fields, the issue is most certainly that nobody has added support. You can add a feature request at http://hub.qgis.org/projects/quantum-gis/issues/new and set the category to C++ plugins/roadgraph


0

I'm using Ubuntu 14.04, QGIS 2.8.1-Wien and python2.7. Feature.attributeMap() does not work. After much struggles with the undocumented way of implementing new ArcProperter's, here is my working solution. Also serves as a rogue documentation. class SpeedFieldProperter(QgsArcProperter): """ (attributeIndex, defaultSpeed=2.71828, ...


2

Are u sure that you are in the correct catalog? Before you write pyrcc4 -o resources.py resources.qrc Write: cd c:\Users\username\.qgis2\python\plugins\SaveAttributes I think that this tutorial is really good for the introduction of qgis plugins..


0

This should do it: class PointTool(QgsMapToolEmitPoint): def __init__(self, canvas): QgsMapToolEmitPoint.__init__(self, canvas) def canvasReleaseEvent(self, mouseEvent): qgsPoint = self.toMapCoordinates(mouseEvent.pos()) print('x:', qgsPoint.x(), ', y:', qgsPoint.y()) As your question is possibly a duplicate to this post.


3

If you can't connect to the online repository, download the plugin manually: Access the Point sampling tool plugin from the repository. Click the version required: Click the Download button: Extract the plugin folder from the zip file and copy/move it to your .qgis2 directory (e.g. C:\Users\You\.qgis2\python\plugins Restart/load QGIS and it should ...


0

This and others functionalities are coming... (I think for 2.16) http://blog.qgis.org/2015/12/08/crowd-funding-project-for-reading-cad-documents-in-qgis/


4

There are different approaches to this. Customization (+Plugin) Customization is shipped with the official QGIS release. It offers to modify various parts of the user interface, like removing buttons and panels. http://linfiniti.com/2011/07/customizing-the-qgis-ui/ The customized UI can be saved in a .ini file and restored later on. If you need custom ...


0

Change the promote class name and be sure you do not have a conflict with any of the qgis classes. The methods on self are from the qgis canvas, not from the plugin.


0

There was a hangup on the plugin server lately. You might need to click Reload repository at the bottom of the first form to get back to normality.


0

In your code you constructed your canvas with your plugin as its parent. self.canvas = QgsMapCanvas(self) I do not think that you are supposed to do that. If you don't give a specific parent parameter QgsMapCanvas' parent is null. But in your case QgsMapCanvas has a your Kristof3 object which is not a widget as parent. In QGIS, parent of the mapCanvas'...


0

1. Use Plugin builder to create a new plugin The files created are shown in the following picture 2. Convert the resources file (resources.qrc) to Python file (resources.py) using the OSGeo4W Shell pyrcc4 -o resources_rc.py resources.qrc After that, if you look inside the plugin folder, you will notice a new .py file, the resources.py file that was ...


0

You probably need to compile the UI file as well as any resources (.qrc) file. Most plugins have a xxx.ui an a corresponding xxx.py file, example: https://github.com/sourcepole/qgis-openlayers-plugin/tree/master/openlayers has ui_about_dialog.ui and ui_about_dialog.py - you make the .py from the .ui using pyuic4, normally driven by a Makefile rule. Again, ...


0

Next function can change raster values greater than 98 for 0. def changeRasterValues(band): fmttypes = {'Byte':'B', 'UInt16':'H', 'Int16':'h', 'UInt32':'I', 'Int32':'i', 'Float32':'f', 'Float64':'d'} data_type = band.DataType BandType = gdal.GetDataTypeName(band.DataType) raster = [] for y in range(band.YSize): scanline = ...


1

The API documentation says: "The context parameters theExtent, theWidth and theHeight are important to identify on the same zoom level as a displayed map and to do effective caching (WCS; Web Coverage Service). If context params are not specified the highest resolution is used". Then, I think that it always returns one value. For this reason, if you want to ...


3

EDITED 31 May 2016 - Removed need for sum by table by using sum in Spatial Join instead, added step 2. This is an approximate answer, because there is a small possibility of a mistake if two "clusters" of polygons are very close together, it is long, but hopefully quite straight forward. Buffer the polygon layer by a small amount, tick the dissolve box, ...


0

There's a tutorial in the QGIS documentation, might help: https://docs.qgis.org/2.2/en/docs/pyqgis_developer_cookbook/network_analysis.html



Top 50 recent answers are included