Thanks for the reply. I don't think rules files will be so much harder
to understand. The basic concept is quite simple, I'm just having
trouble to explain it.
At first I thought I will only add support for relative layers.
Relative layers will remove the need to write rendering rules in order
in which they should be rendered. The render by order in rules file
principle is main reason why rules files are so scattered.
So basically rules for tertiary road would look like this:
<rule e="way" k="highway" v="tertiary">
<line class="highway-core highway-tertiary-core" relativeLayer="1"/>
<line class="highway-casing highway-tertiary-casing" relativeLayer="0"/>
<text k="name" startOffset="50%" class="highway-name
highway-tertiary-name" dy="0.5px" layer="5"/>
</rule>
The trouble here is you may find out you need some instruction to
render bellow highway casing. This can solved either by renumbering
all highway's relativeLayers or by using relativeLayer like 100, 200
so you have enough space to insert another layer. Both principles are
too error prone.
So I've introduced SetLayer instruction. It will set
layer/relativeLayer to group of instructions. All SetLayer
instructions can be at one place in rules file so rendering order is
clear and easy to change.
The rest of the proposal is just generalization of the basic idea.
Is at least relative layer concept clearer now?
> My first impression is that this will make the rules much harder to
> understand, I certainly have problems understanding just what your
> examples would do.
I've tried to improve the example a bit. I've fixed some typos and
added comments.
--
Jiri
_______________________________________________
Tilesathome mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/tilesathome