The renderer can do many fancy things, and even if you know one, you can’t be sure what the other will do. And this is not even your job as a mapper to define what is “correct”, because it is decision what and how do you want to show things, not the ultimate “correctness”.
For example underground map will most probably show tunnels on top, even if in reality they are not visible on the ground. But this is just an example, maps can be just very different.
In case of default style on OSM.org (osm-carto style, I co-develop) here is a part of how it determines the order of areas (however there is no “global” ordering there):
Thanks for your reply. I’m speaking as a developer interested in how this is achieved, rather than as a mapper. Apologies if I should have asked in a different place.
But yeah, I was basically interested in how the default map style on OSM calculates this and I think you have provided the answer in the link where it says “Landcover areas are ordered by area, with smaller ones later and collisions are allowed. It means that for a given layer smaller areas will cover larger”.
So it seems, given a subset of map data, its required to order features by area size and draw them in that order.
That makes perfect sense, so I’ll try and implement that and see how I get on. Thanks for clearing that up for me, so quickly