6

In Qgis, I have four features that i've selected. They are overlapping polygons and I'd like to cycle through them to see what each feature looks like by clicking on the rows in the attribute table. By default, if you click on a single row, it changes the selection to that feature alone and deselects the other three.

If i remember correctly when this action is performed in ArcGIS desktop, a secondary highlight of that feature is displayed but the original selection remains. If there a way to accomplish this in Qgis?

enter image description here

  • Using "Zoom in" magnify your target polygons as much as possible, until you have only that polygons on your Map Window. Then please select Show Features Visible On Map Filter. It will narrow down your list of features, now you can highlight one of your selected feature. Not a smart way, though :) – Kazuhito Nov 3 '16 at 18:12
2

Solution in @Kazuhito coment can get you close to what you want, but if you have a layer with dense features (eg. lot of points) this will be little messy.

Only solution I know (for now) is right click on feature and select Zoom to feature. Not so intuitive but for few data can work. Some "secondary highlight" in selected subset will be nice feature.

enter image description here

| improve this answer | |
  • ... and it shouldn't be very hard to do ;) – Matthias Kuhn Nov 4 '16 at 17:01
  • Thanks! I think this is the best option currently. While not quite as user-friendly as a secondary-highlight, it allows the focus to be placed on a certain feature without deselecting the others. In my case it is problematic if the zoom level and canvas extent get changed with every feature 'zoom'. The ability to apply the secondary highlight while leaving the zoom/extent of the canvas would be ideal. – jamierob Nov 7 '16 at 16:14
  • I don't know exactly your workflow (size of selected features, density of features etc.) but you can try @AndreJ solution with using Pan map to selected rows (Ctrl+P) function in attribute table. – Oto Kaláb Nov 8 '16 at 7:39
2

It works for me in two steps:

In the field calculator, Create a new field named "test", and set 1 in the Expression box. This will assign the value only to the selected elements.

Then rightclick on the layer -> Filter and use "test"=1 as filter criteria. This will only render the elements that were selected.

You can delete the test field afterwards, or use it with another number for the next selection you want to make. Then you switch from create new field to change existing field.

Instead of filtering, you can set a rule-based styling as well to get only the features with "test"=1.

| improve this answer | |
  • Handy solution! In the second step - filter on the left bottom of attribute table can be used similar way (but all features rendered on canvas), and it will be faster to switch. – Oto Kaláb Nov 4 '16 at 18:06
  • If you aren't adverse to creating objects that need manually deleted later, you could also right-click on the layer and "Save As..." another copy using only selected features. Right-clicking also allows you to quickly copy the style of one layer to the new layer. It would be nice if there was ability to save as a temporary scratch layer rather than an actual file or table. – Nate Wanner Nov 5 '16 at 23:49
  • @NateWanner I don't like that method because you may try to edit the data, which is not your original dataset anymore. Filtering or rendering is safe on that side. – AndreJ Nov 6 '16 at 7:23
  • @AndreJ Good point. It depends on what you are doing. I will sometimes copy the layer, so that it retains the same data source, and then apply a feature filter under the general tab in layer properties. The downfall is your result set can't be individually chosen if the fields don't match, but your "test" column solves that issue. – Nate Wanner Nov 6 '16 at 15:18
  • Thanks! These are interesting solutions to the task. Maybe i'm just lazy, but it would have to be just a display feature in qgis for me to use it. I can't see myself creating fields or making subsets of the dataset to see the features. Depends on what you're after though. – jamierob Nov 7 '16 at 16:19
0

If you toggle editing (on) for the layer, when you click on the row the feature will be selected on the map.

Depending on resolution and what your features look like, you may need to adjust the size of the vertices so they don't overwhelm your feature and make it impossible to see. You can do this by selecting "Digitizing" in the options menu, then adjusting "Vertex markers" to whatever shape/size you want (or you can click "Show markers only for selected features). Unfortunately, it appears that "3" is the lowest size you can choose.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.