Geography Reference
In-Depth Information
Figure 3.20: Attribute action enabled in QGIS
Using the Action
Now that we have it, let's see how to use it. The results of identify-
ing a city on the map are shown in Figure 3.20 . If you compare this
with Figure 3.17 , on page 59 , you will see we now have a new entry at
the bottom of the results list. This is our action, appropriately labeled
“Google search.” To execute an action, you can click it or right-click
and choose the action from the pop-up list (if we had defined more
than one action, we would choose it from this list). When clicked, QGIS
will launch Firefox and execute the Google search for New Orleans. You
can identify another city and use the action to perform a Google search
on it. Depending on your operating system and browser, it may reuse
the current browser window or open a new one.
Now it should be clear where attribute actions could come in handy.
There is one last trick you can use when defining actions. If you use
the special parameter %% instead of a field name, QGIS will replace it
with the value of the currently highlighted field in the identify results
list. In the case of our example, this would allow us to do a search on
any field value in the layer. Most of our fields in the cities layer aren't
well suited for Google searching, but the COUNTRY field would return
useful results. Being able to specify values in this way, as well as the
ability to define multiple actions gives us a lot of flexibility.
What you do with attribute actions is now limited only by your imagi-
nation and cleverness.
Now that we've exercised our vector muscles, let's move on and work
with some raster data.
 
 
 
Search WWH ::




Custom Search