Learning GIS with Game of Thrones (IV): Selecting tools

Selecting tools are very important in all the GIS because, among other things, there are a lot of tools that are executed on selected elements. Besides they can be useful to locate elements with specified characteristics easily.

Before starting we remember that, as we saw in the post about Tables, where we select elements of a layer they are selected on its attribute table too (and vice versa).

Selecting tools can be found at the “Selection” menu or in the corresponding button:

015_got

Most of the selecting tools are graphical and their working is similar (and very easy). We are going to explain this working and we encourage you to test the different graphical selection tools.

To apply most of the graphical selection tools we have to press the main button of the mouse on the origin point of the selection, then drag and drop to finish selecting. In the selection by polygon case, for example, we have to click on each vertex of it and double click to finish it. And in simple selection option, we only have to click on the element to be selected. 

To add entities to an existing selection, we have to keep “Control” key pressed while we select the elements. If we want to add or remove an element of a group of selected geometries, we have to press “Control” key and click on them. The selected elements are shown in yellow colour.

Have you tested it already?

Well, we’re going to see the non graphical selection tools in detail. Before starting open your “Game of Thrones”project…

Selection by attributes

This tool is in the “Selection/Select by attributes” menu or from the corrresponding button:

It allows to select elements through an enquiry of attributes.

The interface is this one:

e017_got

  1. Fields. List of attribute fields of the layer. When double clicking on a field it’s added to the enquiry of the selection.
  2. Logical operators. It allows to add a logical expression to the enquiry pressing on them.
  3. Known values. It shows a list with the different values of the selected field. When double clicking on it, it’s added to the enquiry.
  4. Enquiry. Space where the enquiry is being represented. It allows to be written directly.
  5. Selection options.
    • New set. It creates a new selection.
    • Add to set. The results of the new enquiry is added to the existing selection.
    • Select from set. It creates a selection from the existing one. The enquiry is done on the elements selected previously and not on the whole layer.

Now we are going to apply “Select by attribute” tool to select all the castles of our geography. For that we are going to put “Locations” layer active (clicking on its name the name will change to bold). We run “Select by attribute” tool and make this enquiry: “type” = ‘Castle’

e018_got

When we press “New set” all the castles of the layer will be selected. Now we can consult the attribute table of the layer to check it (as we saw at the “Tables” post) or navigate on the Wiew to see the castles location (as we saw at the “Navigation tools” post).

Select by layer

This tool is available from the “Selection/Select by layer” menu and from its corresponding button:

018_got

It allows to select elements from a layer according to its spatial relationship with elements from another layer. 

The interface is this one:

e028_got

  1. Select items from active layer that are… Pull-down menu that allows us to indicate the selection method. e020_got
  2. Selected items of a layer. It allows us to select the layer for the spatial relationship through a pull-down menu. The elements that we want to take into account have to be selected at that layer. If we want a relationship of the whole layer we would have to select all the elements of that layer.
  3. Selection options. Similar to the “Select by attribute” ones.

Now we are going to do an exercise where we will select all the elements of the “Locations” layer that are located in “The Westerlands”. For that we are going to activate “Political” layer, that includes the different kingdoms of Game of Thrones, and using “Select by attribute” tool we are going to do this query: name = ‘The Westerlands’

We also would be able to select the polygon graphically, but at this way we review the tool that we have just known. Results will be:

021_gotWe have the element selected in our reference layer already. Now we activate the “Locations” layer and we press “Select by layer” tool. In the new window we indicate these options:e021_got

We press “New set” and we will get all the locations contained in “The Westerlands”:

023_got

See you in the next post…

This entry was posted in english, gvSIG Desktop, training and tagged , . Bookmark the permalink.

3 Responses to Learning GIS with Game of Thrones (IV): Selecting tools

  1. Dina says:

    I have learnt so much, thanks to you.

  2. Pingback: Learning GIS with Game of Thrones (VIII): Field calculator | gvSIG blog

  3. Pingback: Learning GIS with Game of Thrones (XII). Graphic editing tools | gvSIG blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s