Linked Questions

0
votes
2answers
2k views

Point Click for Coordinates - Stand Alone QGIS in Python [duplicate]

I am implementing a stand alone version of the answer to this question How to programatically check for a mouse click in QGIS My code is below. The code compiles without error, and the toolbar button ...
2
votes
1answer
2k views

`NameError: name `qgis` is not defined` in QGIS Plugins

In the QGIS (2.99) Python Console, the name/variable qgis seems to be automatically defined. However, in writing a plugin, there is an error whenever I refer to qgis. For example, in I have qgis....
0
votes
2answers
2k views

How to display data from a feature?

I want to display data based on the feature currently selected/clicked on. I am following a tutorial from http://www.qgisworkshop.org/html/workshop/plugins_tutorial.html. It initially shows you how ...
4
votes
1answer
953 views

Programmatically selecting features by polygon

Expanding upon this post how could you use QGIS to programmatically draw a selection polygon and select features within the polygon? I have been using QgsMapToolEmitPoint(self.canvas), to find and ...
1
vote
1answer
908 views

Capturing mouse movement on QgsMapCanvas?

I have a python app that uses QgsMapCanvas as map display. I put it inside a QWidget, which is then inside another control. The problem is that there seems to be no way of tracking mouse move event on ...
3
votes
1answer
2k views

Retrieve point coordinates from map canvas using QGIS API [duplicate]

I'm trying to build a plugin that firstly captures the map coordinates. I have tried to adapt the map tool explained in this post: How to programatically check for a mouse click in QGIS The code I ...
1
vote
1answer
903 views

Getting row, col on click of a pixel on a QGIS map

I want to get the row, col coordinates of a raster I'm viewing in QGIS by clicking on a pixel. I found Displaying row/column of point in raster using QGIS?, which presumably provides hints about how ...
1
vote
1answer
739 views

Event programming in QGIS

I have identified a need to change VRTs raster order through its order of appearance in it's respective XML file. Unfortunately this seems to not be possible to do dynamically using QGIS commands or ...
2
votes
0answers
946 views

Using custom behaviour on right click and actionPan on left click in QGIS plugins?

I implemented a maptool that draws a red cross on the point that is being right-clicked on. There are good how-tos, such as this topic : Programatically check for mouse click in PyQGIS? But I happen ...
2
votes
1answer
493 views

Dynamically selecting t layer features implementing canvasMoveEvent of QgsMapToolIdentify class?

In my QGIS plugin I need to dynamically select features of a layer with the mouse move event. In Programatically check for mouse click in PyQGIS? the canvasMoveEvent of the QgsMapTool class is ...
2
votes
1answer
447 views

Combining a MapTool and a QGIS plugin toolbar?

This is a follow-up question to my question about how to build a QGIS plugin and link a textbox to the plugin toolbar (Adding textbox to QGIS plugin toolbar?). In addition to that, I was wondering ...
1
vote
0answers
689 views

Editing QGIS point layer to retrieve attributes of intersecting line layer? [closed]

I'm creating a custom editing form using QGIS 2.0 and would like to modify the mouse event when creating a point. I've gotten a start by reading Programatically check for mouse click in PyQGIS? In ...
0
votes
0answers
468 views

AttributeError: Myclass instance has no attribute 'x'

I am trying to select a feature from the layer using my plugin. When working with my plugin in main Python function using QGIS, I receive an AttributeError when I call a class method from within the ...
1
vote
1answer
224 views

QgsMapCanvas object is not callable (Ubuntu with, Eclipse, Python & QGIS 2.0)

I'm basically borrowing the code for picking up a coordinate from a mouse click from this answer : How to programatically check for a mouse click in QGIS However in a stand alone application I do ...
2
votes
1answer
60 views

Getting coordinates on click and pass it to dialog using PyQGIS?

I am creating a plugin in which i need to get coordinates by clicking on QGIS canvas so i tried the solution mentionned at Getting coordinates by clicking on QGIS Canvas with PyQGIS? but it didn't ...

15 30 50 per page