- Practical GIS
- Gábor Farkas
- 251字
- 2021-07-02 22:49:16
Filtering layers
The filtering dialogue can be accessed by right-clicking on a layer in the Layers Panel and selecting Filter. As we can see in the dialogue, filtering expressions are much more restrictive in QGIS as they only allow us to write basic SQL queries with the fields of the layer. Let's inspect our study area in the administrative boundaries layer with the Identify Features tool, select a unique value like its name, and create a query selecting it. For me, the query looks like the following:
"NAME_1" = 'Baranya'
Applying the filter removes every feature from the canvas other than our study area:

Now the only feature showing up on the canvas is our study area. If we look at the layer's attribute table, we can only see that feature. Now every operation is executed only on that feature. What we cannot accomplish with filtering is increasing the performance of subsequent queries and analyses. Rendering performance might be increased, but, for example, opening the attribute table requires QGIS to iterate through every feature and fill the table only with the filtered ones.
Let's practice filtering a little more by creating a filter for the GeoNames layer, selecting only points which represent first-level administrative boundaries. To do this, we have to supply the following query:
"featurecode" = 'ADM1'
- jQuery Mobile Web Development Essentials(Third Edition)
- Spring Cloud Alibaba微服務架構設計與開發(fā)實戰(zhàn)
- Game Programming Using Qt Beginner's Guide
- 算法基礎:打開程序設計之門
- C和C++安全編碼(原書第2版)
- 高級C/C++編譯技術(典藏版)
- Visual Basic學習手冊
- H5頁面設計:Mugeda版(微課版)
- HTML5從入門到精通 (第2版)
- Java高并發(fā)編程詳解:深入理解并發(fā)核心庫
- C++從零開始學(視頻教學版)(第2版)
- 三步學Python
- 微軟辦公軟件認證考試MOS Access 2013實訓教程
- Instant Highcharts
- 競技游戲設計實戰(zhàn)指南:MOBA+RTS+TCG+FPS