Just found this in QGIS and have had a quick play and really like the way it functions, so wanted to share it with everyone. It’s early days, so once I get to grips with it I will post something a bit more descriptive.
QGIS has Attribute Actions where an action can be performed that uses the value of a feature’s attribute, e.g. opening a pdf or image of an asset. It is possible to run queries or python scripts and capture the results. I’m going to add an action to the Named Place layer that performs a Google search on the location’s name:-
- Right click on the layer in the Layer Properties panel.
- Select Properties to open the Properties dialogue box
Select the Actions tab:-
- Select the action type; in this case it’s Generic
- Name the action
- Enter the details of the action. I need to add the path to the web browser wrapped in speech marks. I then need to leave a space and then add the URL to be opened wrapped in speech marks.
- Press the Insert Field button to add a fieldname to the action.
- The final text should read: “C:/Program Files/Internet Explorer/iexplore.exe” “http://google.com/search?q=%5B% “NAME” %]“
- Click the Add to Action List button.
To run the action for a feature, use the information tool to select a feature from the layer; and then select the Action from Identify results pop up:-
Existing actions can be updated by selecting the action and pressing the update selected Action button