I have a set of locations such that there are partitioned into five clusters, I used the categorized property under styles to differentiate points belonging to different clusters using different colors but I want to run queries such that I can select and display the points on the map according to cluster numbers using the queries in qgis.
-
Once you have applied the categorized style to your layer, you should see the different categories into the TOC (Table of contents = layers list). Each category is fitted with a tick box that you can tick or untick to display / hide points belonging to each category.– wiltomapCommented Jan 27, 2016 at 7:10
-
@wiltomap thanks for that I know that but what i really want is to implement this using queries and not manual selection– amankediaCommented Jan 27, 2016 at 7:15
-
You can select points via a query. These points will then be highlighted with the selection color specified for your QGIS instance. I don't know how to display and hide points at the same time via a query...– wiltomapCommented Jan 27, 2016 at 7:38
-
@wiltomap - Consider posting your comments as an answer =)– JosephCommented Jan 27, 2016 at 10:24
1 Answer
Two possibilities come to me:
Categorized styling. Once you have applied the categorized style to your layer, you should see the different categories into the TOC. Each category is fitted with a tick box that you can tick or untick to display / hide points belonging to each category.
Query via Select by expression. You can also select points via a query (via Field Calculator). These points will then be highlighted with the selection color specified for your QGIS instance. I don't know how to display and hide points at the same time via a query...
-
How and where to execute the select query so that it chooses according to cluster numbers? Commented Jan 29, 2016 at 6:24
-