2

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. – wiltomap Jan 27 '16 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 – amankedia Jan 27 '16 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... – wiltomap Jan 27 '16 at 7:38
  • @wiltomap - Consider posting your comments as an answer =) – Joseph Jan 27 '16 at 10:24
2

Two possibilities come to me:

  1. 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.

  2. 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...

| improve this answer | |
  • How and where to execute the select query so that it chooses according to cluster numbers? – amankedia Jan 29 '16 at 6:24
  • Use Field Calculator (I've updated my post to add this). – wiltomap Jan 29 '16 at 14:51

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.