I am rendering data from OSM. There are various styles for different features(city road, highway, country road, walking path..). In order for a highway to be rendered above a simple road, it has to be rendered last, otherwise the roads would look like they lay above the highway. Of course this applies in general to all objects, not just roads.
So I wonder how can I determine the proper order? Using the area of the feature usually works for polygons, but even then not always. The OSM has a gazzilion of tags so trying to figure this out via trial and error would take ages. I'm sure there is some guideline or prepared set of rules for this somewhere but I haven't found it yet.