1

I have subset a shapefile of points to only include those having a value of (for example) 33 in the variable "Bout" using a rule based assignation:

enter image description here

Now I would like to apply a sub-category to that rule which colours the points by date like so:

enter image description here

However this uses the range of the original data rather than the range within the subset. Is there a way to only spread the colour values across the range of the subset data without manually creating each category? It is doable by simply removing the values from the sub-category manually and recalculating the value-based colours but I was hoping for a more elegant coded solution as I am a python amateur.

  • Brute force solution: Export your subset to a new shapefile. – Erik Aug 22 '18 at 14:48
  • thanks @Erik, I had considered that but having to do this tens of times and creating bunches of shapefiles is a bit too messy. – Jojo Ono Aug 22 '18 at 14:56
  • That is where the modelbuilder comes in handy. – Erik Aug 22 '18 at 15:00
3

You may filter your shapefile with the query builder (it's in the general tab of the layer properties) then create your symbology by date on this subset.

By filtering at the provider level you don't load all the value and the range should match your subset

If you need several subset you could duplicate your shapefile and use different filter for each (by duplicating I mean using right-click>Duplicate that load several time the same shapefile, not creating a hard copy)

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.