Tag Info

Hot answers tagged

4

There are two places where python plugins can be found: in the applications path (C:\OSGEO4W\apps\qgis\python\plugins or C:\Programs\QGIS Brighton\apps\qgis\python\plugins) In you user directory C:\users\username\.qgis2\python\plugins The first place is only for core plugins like fTools and GdalTools, while the contributed go into the second one. The ...


3

I use this in my plugins: def resolve(name, basepath=None): if not basepath: basepath = os.path.dirname(os.path.realpath(__file__)) return os.path.join(basepath, name) This is handy if you want a file relative to your plugin e.g plugin.py icon.png resolve('icon.png') will return the full path to icon.png. Put this function inside a top ...


2

Just pass "TIF" as argument. Try this from the QGIS python console: iface.mapCanvas().saveAsImage("/path/to/file.tif",None,"TIF") It works on QGIS 2.6.0 If you're working on a plugin, you also have the iface object at your disposal.


2

There is a big advice Install, before, the following python libraries: twisted\ Twisted-13.0.0-py2.7-win32 ( https://pypi.python.org/pypi/Twisted/13.0.0 ) zope\ zope.interface-3.6.0-py2.7-win32 ( https://pypi.python.org/pypi/zope.interface/3.6.0 )in the plugin window. Unfortunately, there is no package of zope.interface-3.6.0 for Python 2.7, which QGIS ...


2

It turns out that using Embed Layers and Group with copy/paste of the styles to newly added layers was not working with layers with graduated styling. When I copied and pasted the styles, the affected attribute column would change to the wrong one, and when I changed it back, the styles would reset to the default graduated style. I did find another solution. ...


2

This is maybe not the smartest solution: Open your (the big) project and a new (blank) project. You can have many QGIS projects open at one time. Import all your project layer into the new (blank) project and copy-paste the layer styles.


2

You can use the LRS plugin, which enables linear referencing support for QGIS. You can read the documentation here. As you can find there, the plugin supports several linear referencing methods: Route calibration: Helps you to set measures along routes and interpolate between missing values. It is the initial step for performing other operations on routes. ...


2

if you go to https://plugins.qgis.org/plugins/plugins.xml?qgis=2.6 you will see the version error. I am facing this problem as well. However, I can't find many users report about this problem, so I think it should be the computer setting problem ?


2

The problem is caused by a plugin, inasafe, in the QGIS Python Plugins Repository that has a maximum version of 2.999.9999 which causes the error enountered. The entry for the latest version of InaSAFE - 2.2.2 - has an invalid QGIS MAximum Version. Perhaps setting it to 2.99 as previously would be the thing to do.


2

Just add the BaseLayer as a RasterLayer. <GDAL_WMS> <!-- Data is subject to term of use detailed at http://code.google.com/intl/nl/apis/maps/terms.html and http://www.google.com/intl/en_ALL/help/terms_maps.html --> <Service name="TMS"> <!-- ...


1

There turn out to be two methods (more?) to see the list of available 'panels' in QGIS. One is through the main menu: View | Panels The other is to 'right click' on a toolbar. The check box for OSM Place Search is available using the second method, but not the first. NB: This is also the case for at least one other panel I can see (undo/redo).


1

Open the JavaScript console by pressing Ctrl + Shift + J key (in case of Chrome) and take a look at error message and location where the error occurred. You can get some hints to know the cause of the problem. Then please open an issue to the plugin's repository on GitHub. If you cannot understand well, send me (plugin author) the set of exported data.


1

Source code for QGIS is on Github: https://github.com/qgis/QGIS/ The plugins are at https://github.com/qgis/QGIS/tree/master/src/plugins If you need to get source for a particular version of QGIS, its probably easiest to download the relevant tarball, although you could select from a branch. For example, for 2.6 it would be ...


1

Just look on the github page at the source code https://github.com/qgis/QGIS/tree/master/python/plugins


1

On Windows, you need to copy zope twisted inside the QGIS path. For example: QGIS Brighton\apps\Python27\Lib\site-packages\twisted\ QGIS Brighton\apps\Python27\Lib\site-packages\zope\


1

You can clear a QComboBox by calling its clear() method. In your case, it would make sense to edit the run() method, so that every time the user launches the plugin (for example, by clicking the plugin's main button), the QComboBox is cleared before layers are added to it: def run(self): """Run method that performs all the real work""" # show the ...


1

Try to move the below part of the code from the run to the initGui function. layers = QgsMapLayerRegistry.instance().mapLayers().values() for layer in layers: if layer.type() == QgsMapLayer.VectorLayer: self.dlg.featurecombo.addItem( layer.name(), layer )


1

AndreJ is right. When I did an upgrade of QGIS from version 2.6.0 to 2.6.1, python-qgis was not upgraded in the process and was held back at version 2.6.0. This I confirmed by running dpkg below. dpkg -s python-qgis After manually upgrading python-qgis as suggested by AndreJ. sudo apt-get install python-qgis QGIS finally was able to reload python ...


1

The QGIS Cloud plugin is broken for me too on Windows XP and 7 with 32-bit QGIS 2.6.1 standalone. You can grab an older version from here: https://plugins.qgis.org/plugins/qgiscloud/version/0.11.11/ and extract it to C:\Users\username\.qgis2\python\plugins or the equivalent on other OS. The version 0.11.11 starts for me without complaining. But don't try ...


1

Can you try uri1.setUseEstimatedMetadata(True) before setting the connection ?


1

You can use the QGIS plugin LRS for that. It accepts points not lying on the line, so you avoid the first step (snapping points to lines). This is the workflow: Based on both a line (routes) and a point (for calibration) layer, go to the Calibration tab. Select the line (pipeline) layer with its route field (a field that identifies routes, it's very ...



Only top voted, non community-wiki answers of a minimum length are eligible