Questions tagged [actions]

An action is something that happens when you click on a feature (in QGIS). It can add functionality to a map, such as retrieving additional information about an object.

Filter by
Sorted by
Tagged with
17 votes
6 answers
19k views

Show images related to features in QGIS?

Say for example, if there's a point data with old trees, then when you use the identify tool, you can see the photograph of the tree Or even one level further, the labels displaying these images ...
Luffydude's user avatar
  • 2,258
6 votes
2 answers
7k views

Creating multiple select dropdown list in QGIS

Is it possible to create a multiple select dropdown list/select widget in QGIS which links to a separate txt file? I want to collect species lists for different locations in QField but do not want to ...
Plecotus's user avatar
5 votes
2 answers
777 views

Developing QGIS Action which loads a raster

I'm using the action code of this question: "How to create a QGIS Action which loads a raster?" qgis.utils.iface.addRasterLayer('E:\\Plot Sheet Devt\\1974-1984\\1250k\\[% Grid_Ref %].TIF', '[...
Daniele Piccolo's user avatar
3 votes
1 answer
3k views

Creating QGIS action which copies features between layers?

i tried (i never tried before...) to write a simple python code like action in QGIS on my "XXX" vector layer that: open a layer "YYY" copy the selected feature on my "XXX"layer paste the selected ...
user22892's user avatar
2 votes
1 answer
761 views

How to call a method by BOTH a button AND a key shortcut

I have been trying to call a method by BOTH a key shortcut (as described here http://www.qgis.org/en/docs/pyqgis_developer_cookbook/snippets.html) and a button I created on the toolbar. The button ...
mic's user avatar
  • 345
5 votes
1 answer
2k views

Editing feature geometry in action using PyQGIS

I have fieldwork photos stored in a vector layer, geotagged from EXIF GPS data. Sometimes the GPS is off, or even missing, and I need to move their position manually. Unfortunately, the Advanced ...
Houska's user avatar
  • 7,433
5 votes
2 answers
3k views

Zoom Canvas to Selected Features with Python call from QGIS Layer Action

I have been trying to get one layer's clicked-on feature to have an effect on another layer's viewed features with some success, but I am unable to get the map canvas to be filled by the the selected ...
gseggie's user avatar
  • 203
5 votes
1 answer
332 views

QGIS 2.2 - possible to do a JOINS from the Action list?

I have a set of layers that need to be joined (Layer Properties > Joins) to one specific layer. The reason for this is that I will be updating and adding new layers into my project and would like a ...
Joseph's user avatar
  • 74.6k
4 votes
1 answer
620 views

What is this 'Run layer action' and how to use it?

Following on from this question: Run QGIS layer Action on all selected features, a possible solution was to create an action in Python which iterated through the layer's selected features. If you ...
Joseph's user avatar
  • 74.6k
3 votes
1 answer
2k views

Run QGIS layer Action on all selected features

QGIS is such an amazing tool with lots of useful features, so that it's easy to overlook some of them. Just to be sure it's not already implemented in QGIS 2.18: Is there any Attribute Table option ...
christoph's user avatar
  • 4,661
3 votes
1 answer
2k views

how do I view geotagged photos and audio points in qgis mac?

How can I view geotagged photos and play audio files in qgis? For photos, HTML map tooltips used to work in qgis, but don't as of 2.18.2. For audio, I don't know of a solution.
jamierob's user avatar
  • 1,443
2 votes
1 answer
1k views

View HTML field data with QT4 browers as a QGIS Run Feature Action Tool

I've successfully populated a sqlite table with an HTML-encoded-table as a field attribute, and so there is literally a Table within a single field value in sqlite, for each record. This is going to ...
user12711's user avatar
  • 1,600
2 votes
1 answer
674 views

Open specific page of a PDF using QGIS actions

Can anyone help me with the syntax to open a .pdf-file at a specific page using a QGIS action? For example, a 50 page pdf has the information of use at page 8, so invoking the action in the QGIS Map ...
Simon Hume's user avatar
2 votes
2 answers
806 views

Open mail client when clicking feature in Attribute Table

One of the attributes/features of my layer contains an email address. I'd like to be able to open the default mail client by clicking on the mail address from the Attribute Table. After some initial ...
user28233's user avatar
  • 387
1 vote
0 answers
37 views

Identify clicked feature in external Python script for QGIS layer action

I use the action editor in QGIS to code an action, but I want to move the code to a PyQGIS script and import it to the action instead of directly typing it in the action editor. I changed this line ...
winnewoerp's user avatar
1 vote
1 answer
126 views

Opening PDF w/ action based on variable crashes QGIS

I found this script which I modified a bit to open a pdf based on a page number given in the attribute list. Upon trying to execute the action it works just find but QGIS (3.4.15) is crashing! Any ...
simon's user avatar
  • 21
1 vote
1 answer
253 views

GIS Action that loads a raster, creates pyramids and sets color

Using the code in "Developing QGIS Action which loads a raster". from PyQt4.QtCore import QFileInfo,QSettings from qgis.core import QgsRasterLayer, QgsCoordinateReferenceSystem s = QSettings() ...
Daniele Piccolo's user avatar
1 vote
2 answers
1k views

Filling fields instantly and automatically when creating new entity in QGIS

I have a polygon layer, I want to fill the fields automatically each creation of a polygon. Knowing that there is a spatial relationship (intersection, contain ...) between my polygons and other ...
Naslar's user avatar
  • 55