There are some publicly available PDFs and image files of diagrams showing UK rail track layout (basically flow charts), which I want to parse to something more computer-friendly (a database perhaps, or at least just the text to start with; but keeping the arrows) - ultimately for storing in a graph database. I'm happy to do some post-processing to clean up the output, I'm just looking for some software to get started with.
There's two main formats - a png image, an example of which can be found here: https://wiki.openraildata.com/index.php?title=File:TD_Map_A2.png
... or a PDF document, a screenshot of which can be found below (taken from https://wiki.openraildata.com/index.php?title=File:W2_Block_Schematic.tar.gz)
I am looking for free software (ideally Windows) to get me started on this - it doesn't have to cover everything in the images, or even be 100% perfect.
Can anyone recommend something that might have a chance at doing what I need?
Note that I am interested in the relationships between nodes, rather than the spatial layout of the graphs (i.e. the x and y positions of the nodes are basically irrelevant), because it's a schematic rather than a map - if that makes sense?