Home » railML newsgroups » railML.infrastructure » [railML3] Texts on boards
Re: [railML3] Texts on boards [message #3928 is a reply to message #3924] Mon, 09 March 2026 11:06 Go to previous messageGo to previous message
Mathias Vanden Auweele is currently offline  Mathias Vanden Auweele
Messages: 180
Registered: February 2025
Location: Brussels
Senior Member
Today at the railML vs BaneNOR meeting, I raised the idea of having the possibility to add an svg to describe the board layout. That would allow all possible things to be added (arrows, text, illustrations, ...) in all kinds of order or orientation with all kinds of fonts, sizes and so on.

If it's only about the graphical information and nothing needs to be extracted then this would fill the use case (for example for a track layouter). Additionally SVG support parameters/variables so this is actually also a very future proof way of working, incase a templated approach would be taken.

Here's an example of SVG code for the two attachments of Terje

The round board:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" width="200" height="200">
  <circle cx="100" cy="100" r="96" fill="white" stroke="black" stroke-width="4"/>
  <text x="100" y="60" text-anchor="middle" dominant-baseline="central" font-family="Arial Black, Arial, sans-serif" font-weight="900" font-size="40" fill="black">M</text>
  <text x="100" y="100" text-anchor="middle" dominant-baseline="central" font-family="Arial Black, Arial, sans-serif" font-weight="900" font-size="40" fill="black">444</text>
  <text x="100" y="140" text-anchor="middle" dominant-baseline="central" font-family="Arial Black, Arial, sans-serif" font-weight="900" font-size="40" fill="black">MAG</text>
</svg>

The rectangle board:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 360 200" width="360" height="200">
  <rect x="3" y="3" width="354" height="194" fill="white" stroke="black" stroke-width="4"/>
  <text x="180" y="56" text-anchor="middle" dominant-baseline="central" font-family="Arial Black, Arial, sans-serif" font-weight="900" font-size="48" fill="black">M</text>
  <text x="180" y="103" text-anchor="middle" dominant-baseline="central" font-family="Arial Black, Arial, sans-serif" font-weight="900" font-size="48" fill="black">444</text>
  <text x="180" y="150" text-anchor="middle" dominant-baseline="central" font-family="Arial Black, Arial, sans-serif" font-weight="900" font-size="48" fill="black">MAG</text>
</svg>

For general reference: an SVG is "Scalable Vector Graphics" and as you can see above, allows to define very simple but also very complex graphics in code, based on vectors. The 'Scalable' part means that you can scale this to something very big and something very small. There are no pixels that need to be scaled, it's first the vector that is scaled and then the pixels are calculated. That's why it's used a lot for web.

In my opinion, svg's would make the most sense here. It's also an extensive of the XML data format


Mathias Vanden Auweele
Railway data freelancer
https://matdata.eu
Brussels, Belgium

[Updated on: Mon, 09 March 2026 12:37]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: oprational point attribute simulatniousEntry missing
Next Topic: [railML v3.3 wiki] Ambiguous reference direction of track@mainDirection
Goto Forum:
  


Current Time: Sun Nov 08 18:53:41 GMT+1 2026