Filtering and Inquiries Attributes of Vector Layers

1.4. Filtering and Inquiries Attributes of Vector Layers#

  1. For all vector layers in GIS, each shape has an attribute table. Right click on the land_used_clipped layer. Layer -> Open Attribute Table



    ../../_images/img16.png



  2. The attribute table will open. Scroll down the table and we can see that in total we have 1399 shapes in this layer.



    ../../_images/img25.png



  3. Choose a shape in the view window. At the bottom left of the attribute table choose “Show Selected Features”. The attribute table will only the attributes carry by that shape.



    ../../_images/img34.png



  4. Lets take a look at the attributes of this shape. This plot is a “Residential” and it is a “Dormitory”. Depending on where you find the data, each shapefile carries different set of attributes. Next, lets filter the shapes and see all the plots that are residential.



    ../../_images/img44.png



  5. Right click on the layer. Layer -> Filter …



    ../../_images/img53.png



  6. Double click on “C_DIG1DESC” in the Fields window. Click on the “=” at the Operators window. Then click “All” at the Values window. All the options will appear. Double click on the “Residential” value. At the “Provider specific filter expression” window you will see the expression being formed. Click on ok.



    ../../_images/img63.png



  7. You can see at the view window. You can only see the plots that are residential. You can vary your expression by repeating Step 1-6 with different Fields, Operators and Values.



    ../../_images/img72.png



  8. To make an expression to filter away all objects that is equal NULL, you cannot use “!=” you have to use the following expression.

    "building" IS NOT NULL