| 1 | /*
|
|---|
| 2 | OpenRailwayMap Style File for JOSM
|
|---|
| 3 | OpenRailwayMap - Copyright (C) 2023 user: mikeho
|
|---|
| 4 | This program comes with ABSOLUTELY NO WARRANTY.
|
|---|
| 5 | This is free software, and you are welcome to redistribute it under certain conditions.
|
|---|
| 6 | See https://wiki.openstreetmap.org/wiki/OpenRailwayMap for details.
|
|---|
| 7 |
|
|---|
| 8 | Format details: https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation
|
|---|
| 9 | https://wiki.openstreetmap.org/wiki/MapCSS/0.2
|
|---|
| 10 | */
|
|---|
| 11 |
|
|---|
| 12 | meta {
|
|---|
| 13 | title: "JOSM - mapcss parser error - 10.03.2023";
|
|---|
| 14 | version: "0.1";
|
|---|
| 15 | description: "a part of Style for railroad network map: Signal - only for error description ";
|
|---|
| 16 | author: "mikeho";
|
|---|
| 17 | watch-modified: true;
|
|---|
| 18 | }
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 | node|z20-[railway=signal]::layer_521 { z-index: 521; text-offset-x: -80; text-offset-y: -40; font-size: 20; text-color: #FFF020; text-anchor-horizontal: right; text-anchor-vertical: below; text-halo-opacity: 1; text-halo-color: #202020; text-halo-radius: 2; text-allow-overlap: true;
|
|---|
| 22 | /*
|
|---|
| 23 | tmp365: to_double( 1 / 365.25 ); / * error with an comment on end of line * /
|
|---|
| 24 | tmpDy2: to_double(get(split(".", osm_timestamp() / 86400), 0)) * prop("tmp365"); / * error with an comment on end of line * /
|
|---|
| 25 | */
|
|---|
| 26 | /* day per year / phaser error: division didn't work well (comment in row after accours an error !) */
|
|---|
| 27 | tmp365: to_double( 1 / 365.25 );
|
|---|
| 28 | tmpDy2: to_double(get(split(".", osm_timestamp() / 86400), 0)) * prop("tmp365");
|
|---|
| 29 | /* days since 01.01.1970 (comment in row before accours an error !) */
|
|---|
| 30 |
|
|---|
| 31 | /* did not work well with division:
|
|---|
| 32 | tmpDy2: to_double(get(split(".", osm_timestamp() / 86400), 0)) / 365.25);
|
|---|
| 33 | */
|
|---|
| 34 |
|
|---|
| 35 | tmpDay: concat( 1970 + prop("tmpDy2")); /* year with positions after decimal point "2023.12345" */
|
|---|
| 36 | tYear: get(split(".", prop("tmpDay")), 0); /* year only: - before decimal point - e.g.: "2023" */
|
|---|
| 37 | tmpMo1: get(split(".", prop("tmpDay")), 1); /* only position after decimal point - e.g.: "12345" */
|
|---|
| 38 | tmpMo2: concat("0.", prop("tmpMo1")); /* .. now with "0" and decimal point - e.g.: "0.12345" */
|
|---|
| 39 | tmpMo3: prop("tmpMo2") * 12 + 1; /* tmpMo2 * 12 (Month) + 1 (Month) --> 1, ... ,12 */
|
|---|
| 40 | tMonth: substring( prop("tmpMo3"), 0, 5 ); /* only e.g. "12.34" (5 digits) */
|
|---|
| 41 | text: concat(osm_user_name(), " - ca. Year: ", prop("tYear"), " ca. Month: ", prop("tMonth") );
|
|---|
| 42 | }
|
|---|