[Tilesathome] Proposal temporay tags -- the problem
Heiko Jacobs
jacobs at cousin.de
Fri Jan 30 19:24:59 GMT 2009
Hello
First mail: "the problem -- an exampe" :-)
I also put it in the wiki:
http://wiki.openstreetmap.org/wiki/Osmarender/Proposal_Temporary_Tags
I'm just planning do redesign some rules to support some
proposed features ...
I first decided to make a lot of different width, furtheron
I decided to reduce them to 4 ;-)
So I got the following first cascade of rules (written here
a litle bit "simple") for some standard cases:
<rule bridgecasing>
<rule width-a>
</rule><else>
<rule width-b>
</rule><else>
<rule width-c>
</rule><else>
</else>
</else>
</else>
</rule>
It looks small, but ...
One case is needed to check separate, so:
<rule bridgecasing>
<rule width-c-onothercase>
</rule><else>
<rule width-a>
</rule><else>
<rule width-b>
</rule><else>
<rule width-c>
</rule><else>
</else>
</else>
</else>
</else>
</rule>
When using a special tag, then two ways are close together,
so I decide to draw them a little bit narrower, so another
rule is added, now having the former set of rules twice:
<rule bridgecasing>
<rule narrow-width>
<rule width-c-onothercase>
</rule><else>
<rule width-a>
</rule><else>
<rule width-b>
</rule><else>
<rule width-c>
</rule><else>
</else>
</else>
</else>
</else>
</rule><else>
<rule width-c-onothercase>
</rule><else>
<rule width-a>
</rule><else>
<rule width-b>
</rule><else>
<rule width-c>
</rule><else>
</else>
</else>
</else>
</else>
</else>
</rule>
Then adding some old tags, supported further on as short cuts
<rule bridgecasing>
<rule narrow-width>
<rule width-c-onothercase>
</rule><else>
<rule width-a>
</rule><else>
<rule width-b>
</rule><else>
<rule width-c>
</rule><else>
</else>
</else>
</else>
</else>
<rule firstoldcase>
</rule>
<rule secondoldcase>
</rule>
</rule><else>
<rule width-c-onothercase>
</rule><else>
<rule width-a>
</rule><else>
<rule width-b>
</rule><else>
<rule width-c>
</rule><else>
</else>
</else>
</else>
</else>
<rule firstoldcase>
</rule>
<rule secondoldcase>
</rule>
</else>
</rule>
Then I want to have different cases of lines for two
special cases besides standard case, so every line has
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
So the result up to now is:
<rule bridgecasing>
<rule narrow-width>
<rule width-c-onothercase>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule><else>
<rule width-a>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule><else>
<rule width-b>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule><else>
<rule width-c>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule><else>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</else>
</else>
</else>
</else>
<rule firstoldcase>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule>
<rule secondoldcase>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule>
</rule><else>
<rule width-c-onothercase>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule><else>
<rule width-a>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule><else>
<rule width-b>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule><else>
<rule width-c>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule><else>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</else>
</else>
</else>
</else>
<rule firstoldcase>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule>
<rule secondoldcase>
<rule speciacaseone>
</rule><else>
<rule specialcasetwo>
</rule><else>
</else>
</rule>
</rule>
</else>
</rule>
Now adding the drawing of lines:
<rule bridgecasing>
<rule narrow-width>
<rule width-c-onothercase>
<rule speciacaseone>
<line class="x-general x-spec1 x-c-narrow">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-c-narrow">
</rule><else>
<line class="x-general x-c-narrow">
</else>
</rule>
</rule><else>
<rule width-a>
<rule speciacaseone>
<line class="x-general x-spec1 x-a-narrow">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-a-narrow">
</rule><else>
<line class="x-general x-a-narrow">
</else>
</rule>
</rule><else>
<rule width-b>
<rule speciacaseone>
<line class="x-general x-spec1 x-b-narrow">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-b-narrow">
</rule><else>
<line class="x-general x-b-narrow">
</else>
</rule>
</rule><else>
<rule width-c>
<rule speciacaseone>
<line class="x-general x-spec1 x-c-narrow">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-c-narrow">
</rule><else>
<line class="x-general x-c-narrow">
</else>
</rule>
</rule><else>
<rule speciacaseone>
<line class="x-general x-spec1 x-d-narrow">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-d-narrow">
</rule><else>
<line class="x-general x-d-narrow">
</else>
</rule>
</else>
</else>
</else>
</else>
<rule firstoldcase>
<rule speciacaseone>
<line class="x-general x-spec1 x-c-narrow">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-c-narrow">
</rule><else>
<line class="x-general x-c-narrow">
</else>
</rule>
</rule>
<rule secondoldcase>
<rule speciacaseone>
<line class="x-general x-spec1 x-a-narrow">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-a-narrow">
</rule><else>
<line class="x-general x-a-narrow">
</else>
</rule>
</rule>
</rule><else>
<rule width-c-onothercase>
<rule speciacaseone>
<line class="x-general x-spec1 x-c-wide">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-c-wide">
</rule><else>
<line class="x-general x-c-wide">
</else>
</rule>
</rule><else>
<rule width-a>
<rule speciacaseone>
<line class="x-general x-spec1 x-a-wide">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-a-wide">
</rule><else>
<line class="x-general x-a-wide">
</else>
</rule>
</rule><else>
<rule width-b>
<rule speciacaseone>
<line class="x-general x-spec1 x-b-wide">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-b-wide">
</rule><else>
<line class="x-general x-b-wide">
</else>
</rule>
</rule><else>
<rule width-c>
<rule speciacaseone>
<line class="x-general x-spec1 x-c-wide">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-c-wide">
</rule><else>
<line class="x-general x-c-wide">
</else>
</rule>
</rule><else>
<rule speciacaseone>
<line class="x-general x-spec1 x-d-wide">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-d-wide">
</rule><else>
<line class="x-general x-d-wide">
</else>
</rule>
</else>
</else>
</else>
</else>
<rule firstoldcase>
<rule speciacaseone>
<line class="x-general x-spec1 x-c-wide">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-c-wide">
</rule><else>
<line class="x-general x-c-wide">
</else>
</rule>
</rule>
<rule secondoldcase>
<rule speciacaseone>
<line class="x-general x-spec1 x-a-wide">
</rule><else>
<rule specialcasetwo>
<line class="x-general x-spec2 x-a-wide">
</rule><else>
<line class="x-general x-a-wide">
</else>
</rule>
</rule>
</else>
</rule>
Now bridge casings are solved...
But now nearly the same again for bridge cores:
<rule bridgecore>
<rule narrow-width>
<rule width-c-onothercase>
<rule speciacaseone>
<line class="y-general y-spec1 y-c-narrow">
....
I don't copy the rest :-)
Then nearly the same again for standard casings and cores,
but a little bit more complicate for adding different colors
and more special cases...
Then nearly the same again for tunnel casings and cores
Horrible...
I found the proposal
http://wiki.openstreetmap.org/index.php/Osmarender/NewFeaturesProposal
So some cascades like
<rule bridgecasing>
<rule narrow-width>
<rule width-c-onothercase>
<rule speciacaseone>
<line class="x-general x-spec1 x-c-narrow">
</rule><else>
...
<rule bridgecore>
<rule narrow-width>
<rule width-c-onothercase>
<rule speciacaseone>
<line class="y-general y-spec1 y-c-narrow">
</rule><else>
....
...
may result in source code, where all is at the same place,
that belongs together:
<setOrder "x y ...">
<rule narrow-width>
<rule width-c-onothercase>
<rule speciacaseone>
<rule bridgecasing>
<line class="x-general x-spec1 x-c-narrow">
</rule>
<rule bridgecore>
<line class="y-general y-spec1 y-c-narrow">
</rule>
</rule><else>
...
But source code wouldn't be more simple...
And the proposal isn't available.
(Is anyone working to do it???)
Heiko "Mueck" Jacobs
----- Ende der weitergeleiteten Nachricht -----
More information about the Tilesathome
mailing list