Is there a way to set specific rules when creating a thematic map in MapInfo? I would like to exclude the polygons that have too many of the items I want to represent from the thematic map (something like "restrict dot density map to polygons with population < 10000").
You can use a dedicated expression that will set values below a certain threshold to 0 and keep the remaining values as they are.
I have typically used this for labelling rules but it can also be used for thematics using the Expression builder.
The expression would look like this:
Val(Left$(Str$(COLUMNNAME), Int(COLUMNNAME>50000)*50))
Where:
- COLUMNNAME is the name of the column holding the values you want to create the thematic based on
- 50000 here is the threshold used. You can use any value
You can use any expression to exclude certain records from your thematics. So you don't have to use the same column you are using for your thematics and you can also use a different operator than >.
Here's how the expression looks in the Expression Builder dialog
-
Yes! This is it. I am not good at building expressions... I did try other expression that did not work and thought the program wouldn't allow to do it. – Pescariz Aug 31 '17 at 13:33
-
Rumour has it that MapInfo Pro v17 will add two new MapBasic functions that really will help building expressions like these: IFF() which takes a condition and will return one of two values. Cond() which takes multiple conditions and multiple return values. – Peter Horsbøll Møller Oct 31 '17 at 8:45
You can assign non-symbol for those values.
For example, in next screenshot, you can see how to exclude all building footprints that have more than 100 square meters from a thematic map.
So from all the bulidings here...
you will display thematics for only those which area is larger than 500 sq m
You can query your table, add the result to the map and add the thematic to this query.
In this way, they thematic will only look at the data in the query.
-
Thanks. That is what I ended up doing though I was looking for a bit more versatility in the thematic map creation. – Pescariz Aug 29 '17 at 6:00
-
I just added another answer which might be a better solution for, @Pescariz. Let me know how that works for you – Peter Horsbøll Møller Aug 30 '17 at 7:51