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.

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

1 Answer 1

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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