Wednesday, 30 March 2016

select - Displaying only selected features on map in QGIS?


Not sure if this option ever existed, but the new QGIS version hides a lot of things somewhere else and this seems so simple that I'm kind of convinced it was possible to do this before.


I have quite a large data set with ship tracks. I now want to analyse individual ship tracks (made from point layer with points2one) - however, it is so crowded that it is hard to look at individual tracks. I don't want to save each single track as a new layer, so I wonder if it is possible to select one track in the attribute table and display only that one on the map/hide the others?



Answer




Kadeem's answer will prevent your features from being visible, but they will still be present, if you are trying to identify an individual ship track you may click an invisible feature by mistake. What it seems like you need to do is define your layer so that it's as if those features don't exist. In ArcGIS this would usually be done using a Definition Query, in QGIS the equivalent command is the Layer Subset. Go to the Properties of your layer, under the General tab, at the bottom is the Feature Subset box, click the button below it to bring up the Query Builder:


enter image description here


The Query Builder will help you create an SQL query to define what features in your layer should actually be displayed in your project. Any features not returned by the query are made invisible, not just visually but entirely (they are not deleted from your data, of course, they're just defined out of existence until you remove the Layer Subset query).


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...