Questions tagged [qgis-plugins]

Software plugins that add functionality to the QGIS package

Filter by
Sorted by
Tagged with
7
votes
1answer
920 views

Is it possible to create C# based plugins for QGIS (instead of Python)?

My team has a lot of C# code that we've used for ArcGIS Add-in development. We're thinking of porting some of these tools into QGIS as plugins using QT Designer. However rewriting them with Python ...
7
votes
3answers
811 views

How to use ZonalStats plugin?

I am using QGIS 1.8.0 on a Windows Home Premium 7 machine. I have a single band TIFF that is 187 MB in size. My vector polygon shapefile represents a regular grid of a 147x112 36kmx36km grid cells. ...
7
votes
1answer
299 views

Fixing headings for QGIS custom widgets in Qt Designer

I use custom Qt widgets like QgsMapLayerComboBox for my QGIS plugin, laying the whole thing out in Qt Designer. Using those requires fixing headings in .ui file as described here. Unfortunately I have ...
7
votes
1answer
434 views

How can I extract the parallel/perpendicular distance between two lines with QGIS?

I'm preparing a guide of my town for firemans and is very important to know the width of the streets but I don't know how to process this. I have polygons that represents the block (islands) houses ...
7
votes
2answers
725 views

How to run a spatial query with a raster and vector layer in QGIS?

I have a soil map (vector-polygon layer) and a map of the crops farmed in the same area (raster layer, from the US Cropland Data Layer). I would like to calculate for a given soil type, the surface ...
7
votes
1answer
416 views

Preventing the “Coordinate Reference System Selector” query/window after processing.run()

I want to convert a DXF with python/ogr2ogr. Unfortunately QGIS 2.99 always asks for the CRS. QSettings().value('/Projections/defaultBehavior') 'useGlobal' QSettings().value('/Projections/...
7
votes
1answer
783 views

Editing Layout-Items after loading a QPT-Template in QGIS 3 with Python

I am facing a problem with the new Layout API while implementing a plugin for QGIS 3. Starting point is a layout template in qpt-Format, which contains different elements like (attribute) tables, map, ...
6
votes
2answers
3k views

Get a pixel value

How can i do this operation: I want to get a pixel value fro the satellite image (Landat, GeoTIFF, 7 bands) using qgis-python. What operators should i use? (for example in qgis's Python Console)
6
votes
2answers
4k views

How to remove all selection from all registered layers using QGIS plugin?

I want to remove all selection from registered layer in QGIS using Python. I tried to clear the map canvas using: self.iface.mapCanvas().clear() self.iface.mapCanvas().refresh() but the selection ...
6
votes
2answers
2k views

Convert from EPSG 3857 to EPSG 4326 QGIS2.18

I need to convert EPSG 3857 to EPSG 4326 in a plugin. #example EPSG 3857 x = 5062443.00656 y = -952576.546977 #convert here to EPSG 4326 #...
6
votes
2answers
33k views

Adding XY data on QGIS

Does QGIS menu have any XY tool like in ArcGIS to add XY data? I have used the other method to capture XY coordinate. Can anyone help?
6
votes
2answers
572 views

Load local plugin automatically in QGIS

If I copy my plugin locally to QGIS I have to tick a box in repository to see/load it. Is there any way to make this "checking" automatically, such that when I start QGIS it will be already loaded?
6
votes
3answers
11k views

QGIS start-up error message: “Couldn't load plugin MetaSearch due to an error when calling its classFactory() method”

I'm an Ubuntu 16.04 (64-bit) user and I just recently upgraded my QGIS instalation (from 2.14, "Essen", to 2.16, "Nødebo"). I'm not a programmer and I know little about the details of how python ...
6
votes
2answers
4k views

How to change default path for “.qgis2” folder on Windows?

I'm working with Windows 8 32Bit OS and QGIS 2.8.2. The QGIS default installing path for ".qgis2" folder is C:\Users\image95\\.qgis2. This directory stores several useful components like QGIS ...
6
votes
2answers
3k views

How to connect a PyQGIS plugin with Postgres?

I have some questions for you: I created a python-plugin in QGIS, then I created a Qt gui fom my plugin and at last I created a Postgres DB now I need to make a connection between Qt-gui and ...
6
votes
1answer
1k views

Creating simplified QGIS version with custom interface?

At my institute we are revising and updating a methodology for participatory mapping of land degradation, that involves creating a simple land use map, subdividing each land use unit in a number of ...
6
votes
4answers
4k views

Plugin causes QGIS to crash on startup

I get the message "the plugin will be disabled because it crashed QGIS during last startup." Which plugin? None is identified. I'm a bit of a rookie so not sure where to look to solve this. Running on ...
6
votes
2answers
1k views

GdalTools core plugin “missing metadata file”

I installed QGIS 3 with GRASS 7 this morning via OSGeo4W64, and the application opens up without any issues, however the GdalTools plugin is coming up as "Invalid", showing the error "This plugin is ...
6
votes
1answer
1k views

How to group my plugins in QGIS menu and toolbar?

I work on and test more QGIS plugins which falls into the same category (lets call it MyProcessing). Though they fall into the same category I want to keep them as separate plugins. I would like to ...
6
votes
2answers
666 views

Odd behavior in a QGIS plugin: my function is triggered twice

I have a plugin with a function (triggered by a button) that selects a specific layer by name, then shows its attribute table. When I close the plugin and open it again, the attribute table pops up ...
6
votes
1answer
7k views

Making lines from points like Points2One for QGIS 3

Previously I have been using Points2One to make lines from points in QGIS 2.18 but the plugin is not available in QGIS 3.0. I am wondering if there is an alternative?
6
votes
1answer
6k views

Unit of $length in QGIS Field Calculator

I'm calculating field of various features in my shapefile using QGIS. I'm getting some sample length as 0.134914579766986. I want to know in what unit (eg: meters, km etc) is the above value ?
6
votes
1answer
3k views

Environment variables for QGIS 3 plugin development on Windows

I want to start learning QGIS plugin development, and I'm trying to get set up for Python 3, PyQt5 and QGIS 3. I've installed QGIS 2.99, qt5-devel and setuptools via OSGeo4W. Now I get stuck on the ...
6
votes
1answer
343 views

No “committedFeaturesAdded” signal after dataProvider().addFeatures() - QGiS 2.14.8

I'm working on plugin updating existing shapefile by adding new features to it. And I have a problem with signal that hasn't been emitted by QGIS, when I've added features to layer, using dataProvider(...
6
votes
1answer
518 views

QGIS 2.14 Python sub-menus

I'm trying to add sub-menu items to a menu that linked to a toolbar icon. It's probably best to show what result I'm getting currently, then reference the code: The code is coming from a plugin class:...
6
votes
1answer
2k views

How can I get the field index of the new layer in my script using Python?

I am trying to use layer.changeAttributeValue(fid, fieldIndex, value) to add values to a field in QGIS Basically, I'm creating a plugin which will, if a checkbox is ticked, create a new field, then ...
6
votes
1answer
5k views

Save Visible WMS layer to file

Is there tool to save currently visible WMS layer to file in QGIS, or some place in QGIS where you can get needed xml to fetch it using gdal ?
6
votes
1answer
2k views

QGis Making Column Value of Attribute table unique

For a shapefile, I have a field named id with the following contents in it: 1 1 2 2 I want to make these values unique such as: 1 2 3 4 Is there any way to achieve this in Quantum GIS (using any ...
6
votes
1answer
258 views

Line lengths calculation in combination with DEM

I am working in QGIS 2.18.0. I have a problem regarding calculation of line lengths in combination with raster files, to be precise with DEM raster. There is not a problem to calculate the line ...
6
votes
1answer
984 views

Import csv with python and add headers

Currently I am writing a plugin which allows the user to quickly import a .txt file as a point layer in qgis. The .txt file is output data from a gps device and does not contain a header row. However, ...
6
votes
1answer
1k views

Points in Polygon missing from QGIS 2.16.x?

Looking to do a basic Hex analyis with some random points within the Gulf of Mexico. I created a hex grid from MMQGIS Under my Vector tool - Analysis tools, I dont have Points in Polygon. Is it ...
6
votes
1answer
603 views

How to make my programmatically added map items show up in the composer items list?

I try to make a composer via python. I add item, make a composer view and open, but i can't see item in "Items" dock. Also, when i select it, i don't see item properties in "Item properties" dock. ...
6
votes
1answer
196 views

How to add documentation for QGIS Processing algorithms?

In the Processing modeler, many of the algorithm help tabs say: Sorry, no help is available for this algorithm. In the QGIS sourcecode, the processing algorithms seem to reside in: python/...
6
votes
1answer
1k views

Making QGIS buttons and my Plugin button mutually exclusive

I've added a toolbar to the QGIS main window and I've added some checkable buttons to the toolbar. How can I make my checkable buttons untoggle QGIS default toolbars' checkable buttons? That is, ...
6
votes
1answer
10k views

How to install OpenLayers plugin on QGIS 2.4? [duplicate]

I am a new user of QGIS, and I just downloaded the version 2.4 on Windows 7/32 bits. And I seem to encounter several problems: I cannot install OpenLayers plugin In the "Plugins" tab under "Manage ...
6
votes
1answer
880 views

Simulate (Mock) GPS Tracks

I have the following scenario: 1) I need to create GPX files for use in testing of a mobile device. 2) The tracks to be described within will span large distances over long time periods (i.e. it's ...
6
votes
2answers
1k views

How to filter the MouseWheel event in a QGIS C++ plugin?

I’m developing a C++ plugin for Qgis and I want to filter/override the mouse-wheel event. I created a “maptool” to select a polygon feature on a vector layer, the feature has two attributes : an id &...
6
votes
1answer
5k views

Problem with print composer when exporting a map with Google Maps Plugin in the background [duplicate]

Whenever I try to export a map with the Google Maps plugin in the background, it exports but just exports to a blank document. When I turn the Plugin off so it is not in the background, it prints fine....
6
votes
3answers
2k views

How to use Threads in PyQgis, mainly to keep UI active?

I'm trying to develop a plugin, which does heavy computations and as a result, user interface becomes inactive. I know that I should use threads to keep the UI alive (specifically, I have a progress ...
6
votes
2answers
2k views

How to run two versions of QGIS simultaneously on Ubuntu 12.04

I really enjoy seeing the new features and icons of QGIS 1.9 nightly versions. It's looking fantastic, and some features are already very useful for my work. However, it is inherently less stable ...
6
votes
1answer
1k views

CAD Like functions in QGIS

Is it possible for a script to be built that will use a reference point and have it draw several polygons based on distance and bearing, then assess the terrain under the polygon for highest obstacles ...
6
votes
1answer
210 views

Is it possible to grow QGIS symbol size over time?

I've got a data set of people movements within my municipality. (between points of places) I've managed it with the plugin for QGIS 'time manager'. Over time people come and go, and based on a count ...
6
votes
1answer
139 views

How to get info from selected object?

I am new to the Quantum Plugin development and wonder if there is more information about the following. I have added a shapefile and am (off course) able to select a point from this shapefile. In the ...
6
votes
1answer
628 views

QGIS Azimuth and Distance Plugin curve

I have just installed the Azimuth and Distance plugin for QGIS and I have been testing it for use with our COGO workload. However when using the Anti-Clockwise ArcDirection method for a curve to the ...
6
votes
0answers
366 views

Adding layer using QgsMapLayerRegistry within thread PyQGIS Plugin

I am developing Python QGIS plugin, where I am opening two threads in run function with one thread performing calculation while second thread is printing value looping and when first thread is ...
6
votes
0answers
372 views

How to write an address search plugin? [closed]

I am migrating some users from MapInfo to QGIS, and before they sign off on it, they want a very simple address search in the same way that we currently have one working in MapBasic. I;ve been having ...
5
votes
8answers
4k views

How to export attribute table with start and end coordinates of lines to Excel?

I am working in QGIS. I have a georeferenced line layer and I want to export the attribute table and the coordinates of start and end points of my lines to Excel. Can I do this with QGIS?
5
votes
3answers
621 views

Display raster value as a tooltip

I would like to display the value of a raster (at least one band) as a tooltip next to the mouse in Qgis. The process would be : I select the raster layer when I move the cursor over the map (or ...
5
votes
4answers
2k views

Using python QGIS network analysis library to calculate short path based on speed and distance?

I want to calculate and show short path from starting point to an end point in a qgis python plugin. in my research i stopped by an article about QGis network analysis library; http://www.qgis.org/en/...
5
votes
2answers
1k views

How to populate QTableWidget via plugin?

I am attempting to populate a QTableWidget by adding rows, this is done by the user clicking on the add button: I have the following code to try and insert rows but nothing is happening: def ...