The case:
I have the parcels of a municipality, with a conformation of cadastral key in the following form:
Department, Municipality, Sector, property. such, that the nomenclature is composed as shown in the image: Example: 0313-0508-00059
The need
The situation is that I am interested in being able to thematize the plots based on the second chain, which is where the sector (0508) is formed. So, you could have the properties with a different color, depending on the sector that is identified in your cadastral code.
The solution
Sure there are ways to make it more advanced, but in this case, simply explain the principle using thematization from rules.
Click the right mouse button on the layer to be themed, select Properties. Then in style, "Based on rules" is selected
Here a new rule is created using the constructor string expressions, I select from fields and values, the CLAVECATASTRAL field, indicating that see me:
All those where the string includes the cadastral key until the 0508 (0313-0508-)
So the string is “CLAVECATASTRAL” like '0313-0508-%' The % symbol is so that from then on the content does not matter.
I define as many rules as sectors I want to thematize. As you can see, it is no longer necessary to build them like the first one, but only to copy / paste the query and modify the sector field. A fill color is defined for each of them, as shown in the following image.
And as a result, we have the map of plots based on the field tematizadas sector (Zone or map as you call this criterion district).
The style can be saved for your application at any time.