<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Vienna, Austria
* Corresponding author.</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>On Linking Heterogeneous Railway Knowledge Graphs</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Stefan Bischof</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gottfried Schenner</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Siemens AG Österreich</institution>
          ,
          <addr-line>Vienna</addr-line>
          ,
          <country country="AT">Austria</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0001</lpage>
      <abstract>
        <p>In the last years railway infrastructure data has become available via public SPARQL endpoints. The ontologies/vocabularies used to represent the topology part of the railway data are mainly based either on the Open Street Map (OSM) data model or on the UML-based RailTopoModel. In this paper we discuss some of the challenges of integrating railway infrastructure data especially topological data. As an example, we show how to link the data available for the Austrian railway network using Open Street Map data via the QLever SPARQL endpoint and data from the ERA Knowledge Graph.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Railway Infrastructure</kwd>
        <kwd>Railway Topology</kwd>
        <kwd>Data Linking</kwd>
        <kwd>Knowledge Graph</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>conceptual models, granularity levels, and coverage scopes necessitate more complex correspondence
patterns that can bridge semantic and structural gaps between the representations.</p>
      <sec id="sec-1-1">
        <title>Our work illustrates these integration challenges through concrete examples and proposes approaches to establish meaningful links between the knowledge graphs. The findings are relevant not only for the specific case of combining ERA and OSM data but also for the broader context of integrating railway data with other sources in industrial settings.</title>
      </sec>
      <sec id="sec-1-2">
        <title>The remainder of this paper is organized as follows: Section 2 reviews related work in semantic</title>
        <p>railway models and semantic integration of railway infrastructure data. Section 3 describes the structure
and characteristics of both knowledge graph systems in detail. Section 4 discusses the challenges
encountered and approaches developed. Section 5 describes the case study of linking passenger stations
in Austria. Finally, Section 6 concludes with implications for practice and directions for future research.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Related Work</title>
      <p>
        Camarazo et al. review several existing ontologies of railway infrastructure, analyse the challenges of
alignments, and propose an ontology alignment method [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. In our work we focus on linking instance
data in knowledge graphs instead.
      </p>
      <p>
        Verstichel et al. describe and compare diferent approaches on how to integrate rail infrastructure
data at the data level [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. In particular UML and ontology-based approaches are compared, showing the
advantages of ontology-based data integration. They acknowledge the main problem of scenarios based
on multiple ontologies: creating mappings between ontologies is a tedious, complex, and error-prone
task. One scenario which would partially address this problem are local ontologies which are built on
top of shared ontologies. These can be either upper ontologies such as BFO [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or vertically defined
ontologies such as the Rail Topology Ontology [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <sec id="sec-2-1">
        <title>Agreeing on such a common, shared ontology as a basis for diferent ontologies for railway infrastructure is a complex task in practice. So far, the diferent ontologies in this area are formally independent although conceptually, however some converge to RTM concepts such as the ERA KG ontology or the railML ontology, which is currently under development.</title>
        <p>
          Rahmig and Richter show how to extract rail topology data from OSM and combine it with data
from rail measurement campaigns [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. The integrated data is then exported as railML XML file. The
data has to be further enriched by data from additional sources to obtain 3D data to enable railway
simulations. While this tool chain combines railway geodata from diferent sources, the data pipeline
which implements the data integration is custom software for a single use case and cannot be applied
to other use cases.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Preliminaries</title>
      <p>Traditional graph representations, with nodes representing switches and edges representing tracks,
prove inadequate for expressing the complex realities of railway infrastructure topologies. Such
simplistic models fail to capture essential characteristics required for meaningful operational analysis,
such as track directionality, physical clearance constraints, valid path combinations through junctions,
and track-specific attributes like electrification systems or speed restrictions. Most critically, simple
graphs cannot properly represent navigability—the precise constraints determining which physical
paths rolling stock can traverse based on factors like train length, weight, or gauge compatibility.</p>
      <p>
        Several more sophisticated models have emerged to address these limitations, including RTM, which
forms the foundation for the European IRS 30100 standard [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]; railML (Railway Markup Language),
which implements RTM and provides XML schemas for railway data exchange [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]; RINF (Register
of Infrastructure) and the ERA Knowledge Graph [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], which standardizes infrastructure parameters
across European networks1. These models employ concepts such as netElements and netRelations
      </p>
      <sec id="sec-3-1">
        <title>1https://www.era.europa.eu/domains/registers/rinf_en</title>
        <p>to model topological connections, distinguish between operational and physical views of infrastructure,
and incorporate detailed spatial and functional attributes necessary for comprehensive railway topology
representation.</p>
      </sec>
      <sec id="sec-3-2">
        <title>The first KG we use in our case study is the ERA Knowledge Graph [ 8]. ERA adopted integrates its</title>
        <p>base registries in a comprehensive KG system. This approach enabled new capabilities, such as route
compatibility checks, which were previously unsupported because the data was distributed over diferent
registries (RINF and ERATV). The key contributions of the initial ERA KG included the development
of an oficial railway ontology, a reusable Knowledge Graph of European railway infrastructure, a
lfexible and cost-eficient system architecture, and an open-source RDF-native web application. The</p>
      </sec>
      <sec id="sec-3-3">
        <title>ERA Ontology partially uses RTM for representing the railway topology.</title>
      </sec>
      <sec id="sec-3-4">
        <title>Geographic Information Systems (GIS) can also model railway topology and infrastructure data.</title>
        <p>Even though GIS are more focused towards spatial modelling, GIS also model railway infrastructure to
provide for example routing services. In particular we use OpenRailwayMap2, which is part of Open</p>
      </sec>
      <sec id="sec-3-5">
        <title>Street Map (OSM), for our case study. OSM is a public, collaborative efort to map geographic data.</title>
        <p>The OpenStreetMap (OSM) data model employs a topological structure composed of three primitive
elements: nodes (point features with geographical coordinates), ways (ordered sequences of nodes
representing linear features or area boundaries), and relations (groups of nodes, ways, or other relations
describing complex geographical relationships). Each element can be annotated with an unlimited
number of key-value pairs called tags, which store semantic information about geographic features.</p>
      </sec>
      <sec id="sec-3-6">
        <title>This flexible schema-free approach allows contributors to map diverse features without rigid predefined</title>
        <p>categories, while community-developed tagging conventions ensure data consistency.</p>
      </sec>
      <sec id="sec-3-7">
        <title>OpenRailwayMap builds upon this foundation as a specialized project focusing on railway infra</title>
        <p>
          structure, utilizing the same core data model but implementing domain-specific tagging schemes to
represent detailed railway-specific attributes such as electrification systems, signalling equipment,
maximum speeds, and track gauges. Even though OSM lacks a semantic representation, several works
have provided such semantic representations. In our case study we use OSM via QLever [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ]. While there
exist other SPARQL endpoints, such as https://sophox.org/ or http://linkedgeodata.org/, the QLever
        </p>
      </sec>
      <sec id="sec-3-8">
        <title>OSM KG provides custom functionality to find all nodes in a geographical area.</title>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Challenges for linking the data</title>
      <p>Even though both, the ERA KG and OSM via QLever, represent the European railway infrastructure in</p>
      <sec id="sec-4-1">
        <title>RDF, combining the two datasets and linking their entities is not trivial.</title>
        <sec id="sec-4-1-1">
          <title>4.1. Topology: RTM vs OSM</title>
          <p>Excerpt of RTM model of rail topology</p>
          <p>NetRelation
positionOnA: {0, 1}
positionOnB: {0, 1}
navigability: { AB, BA, both, none}
Excerpt of OSM model</p>
          <p>OSMWay
member [ordered]
1..n</p>
          <p>OSMNode
id: int
latitude: float
longitude: float
tags: {}
function of the elements, e.g., a OSMWay representing a rail will have the tag railway:rail, whereas
a OSMNode representing a signal has the tag railway:signal.</p>
        </sec>
        <sec id="sec-4-1-2">
          <title>4.2. Structural challenges</title>
          <p>railway topology.</p>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>In the RTM case a switch can be identified by the navigability of the NetRelations. The OSM-switch</title>
        <p>is identified by the tag railway:switch. If the tag is absent, switches can be identified by finding
OSMNodes with three neighbouring nodes. Still the problem remains, which neighbouring node is the
tip and which are the branches of the switch. This can only be done by reasoning about the geo data
and the angle of the outgoing edges. Clearly one cannot expect the OSM data to have the same level of
detail as the RTM model which was specifically created to represent railway infrastructure data.</p>
      </sec>
      <sec id="sec-4-3">
        <title>As can be seen in the figure a simple entity matching approach does not work, as there are no</title>
        <p>corresponding entities. The only candidate for a 1-1 matching would be the end (position 1) of the
NetElement ne_1 as it corresponds to the OSMNode n12. The same applies to the start (position 0) of
NetElement ne_2 and ne_3 respective.
4.2.1. Aggregation level</p>
      </sec>
      <sec id="sec-4-4">
        <title>A special feature of the RTM is that is allows modelling the topology in diferent aggregation levels</title>
        <p>(Figure 3) within the same formalism. Only on the micro level the topology inside the operational points
is known. The meso level focus on the operational points and their connecting tracks. This corresponds
to the level of the ERA knowledge graph. On the macro level the connecting tracks are aggregated in
the information about the railway lines. In contrast in OSM everything is modelled on the same level.
Sometimes special OSMRelations are used to aggregate all the topology elements of an operational
point. But this is by no means required.</p>
        <sec id="sec-4-4-1">
          <title>4.3. Symmetries and Granularity</title>
          <p>Another challenge arise because of the possibility to model the same instance data in various ways.
Figure 4 shows how the same segment of a railway network could be represented in various ways even
in the same formalism. The cases a) and b) are symmetric cases. Case c) splits the second NetElement
into two NetElements. In case d) there is only one implied NetElement, i.e., the track segment between
the two connected OSMNodes.</p>
          <p>nr1: NetRelation
positionOnA: 1
positionOnB: 0
hasElementA navigability: both hasElementB
n12: OSMNode</p>
        </sec>
        <sec id="sec-4-4-2">
          <title>4.4. Linking Shared Entities</title>
          <p>The easiest way to link common entities is via a common identifier, e.g., if a property or a combination
of properties of one entity can be directly mapped to a property of the other entity in a specific
context e.g. the ref attribute of OSMNodes with tag railway:switch correspond to rdfs:label of
railML:SwitchIS entities in a given operational point. If identifiers are not available it might still
be possible to use geospatial coordinates to align the entities. Depending on the type of entities the
geospatial might not be exactly the same in the diferent data sources. Another option for infrastructure
elements within the railway topology is to use topological information e.g. a switch could be identified
by being the ‘second left-traversed switch from the beginning of the operational point in direction X’.
A more sophisticated approach is to represent the topologies as a graph and to use graph algorithms
(isomorphism, graph edit distance or similar) find a mapping between the topology graphs.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Case study: Passenger stations of Austria</title>
      <p>As a case study we attempt to integrate the ERA and the OSM data for all passenger stops and their
connections in Austria.</p>
      <sec id="sec-5-1">
        <title>We use these prefixes in the following SPARQL queries:</title>
        <p>PREFIX country : &lt; http :// publications . europa . eu / resource / authority / country / &gt;
PREFIX era : &lt; http :// data . europa . eu /949/ &gt;
PREFIX ex : &lt; http s :// www . example . org / &gt;
PREFIX geo : &lt; http :// www . opengis . net / ont / geosparql # &gt;
PREFIX loc : &lt;http :// www . w3 . org /2003/01/ geo / wgs84_pos # &gt;
PREFIX ogc : &lt;http :// www . opengis . net / rdf # &gt;
PREFIX osm : &lt;http s :// www . openstreetmap . org / &gt;
PREFIX osmkey : &lt;http s :// www . openstreetmap . org / wiki / Key : &gt;
PREFIX osmnode : &lt;http s :// www . openstreetmap . org / node / &gt;
PREFIX osmrel : &lt;http s :// www . openstreetmap . org / relation / &gt;
PREFIX osmway : &lt;http s :// www . openstreetmap . org / way / &gt;
PREFIX owl : &lt;http :// www . w3 . org /2002/07/ owl # &gt;
PREFIX rdf : &lt;http :// www . w3 . org /1999/02/22 - rdf - syntax - ns # &gt;
PREFIX rdfs : &lt;http :// www . w3 . org /2000/01/ rdf - schema # &gt;
PREFIX skos : &lt;http :// www . w3 . org /2004/02/ skos / core # &gt;</p>
        <sec id="sec-5-1-1">
          <title>5.1. Getting the passenger stations</title>
          <p>The SPARQL query in Listing 1 gets all operational points of Austria and their geo data (in the current
dataset 1799 entries). It contains the (small) stations and passenger stops (1496 entries) but also other
operational points like (domestic) border points, private sidings, etc. We need these (intermediate)
points because we want to also reason about the topological connections of the operational points.
Listing 1: ERA operational points
SELECT * WHERE {
? op a era : OperationalPoint .
? op era : opName ? opName .
? op era : inCountry country : AUT .
? op era : opType ? opType .
? opType skos : prefLabel ? opTypeLabel .</p>
          <p>FILTER ( LANG (? opTypeLabel ) = " en ")
? op era : uopid ? uopid .
? op loc : location ? loc .
? loc loc : lat ? o1 .</p>
          <p>? loc loc : long ? o2 .
}
}</p>
        </sec>
      </sec>
      <sec id="sec-5-2">
        <title>With QLever we can query all the OSMNodes within a certain region. The following queries</title>
      </sec>
      <sec id="sec-5-3">
        <title>OSMNodes representing railway station, stops and halts in Austria (osmrel:16239). This query finds</title>
        <p>3848 OSMNodes, which are significant more than in the ERA case, due to the fact that every halt position
within a station is represented by a diferent OSMNode. If we group the halt positions belonging to the
same station we still get 1698 OSMNodes in contrast to the 1496 ERA entries, because the result also
contains privately operated railway lines, cog railway lines etc. not represented in the ERA KG.
Listing 2: OSM Station
SELECT ? osm_id ? name ? type ? ref ? geometry WHERE {
osmrel :16239 ogc : sfContains ? osm_id .
? osm_id osmkey : railway ? type .</p>
        <p>OPTIONAL {
? osm_id osmkey : railway : ref ? ref .
}
? osm_id osmkey : name ? name .
? osm_id rdf : type osm : node .
# filtering out subway nodes
FILTER NOT EXISTS {</p>
        <p>? osm_id osmkey : subway " yes " } .</p>
        <p>FILTER (? type = " station " || ? type = " stop " || ? type = " halt ")
? osm_id geo : hasGeometry / geo : asWKT ? geometry .</p>
      </sec>
      <sec id="sec-5-4">
        <title>How can we align the ERA operational points with the corresponding OSMNodes? As a first attempt</title>
        <p>one can look for common identifiers. Some OSMNodes with tag railway:station also contain a entry
railway:ref. The value of this ref is the same as the uopid without the AT prefix, e.g., in Feldkirch the
uopid is ATFk and the railway:ref is Fk. Unfortunately this is not always the case (about 40% of the
OSMNodes in the result have a railway:ref) and even worse, sometimes the OSMNode for the railway
station is not contained in any other relation i.e. it is isolated from the railway network. Train stops
and halts on the OSM-level on the other hand do not have a railway ref. After some trial and error as a
pragmatic solution we decided to use the distance of the Geo coordinates and assign the OSMNodes to
the nearest operational point within a certain range (200 m). The found alignments (green in Figure 5)
are a good approximation of the desired result. Of course, one could go on and further refine the queries,
e.g., by incorporating route information, but as stated earlier, this is not the goal of this paper. The main
goal is to show that finding alignments is an iterative process of finding the right queries, choosing the
alignment strategy, and testing, especially if one is not an expert in the involved ontologies. Some of
the ERA OPs cannot be aligned with OSMNodes and vice versa for various reasons. One example is
defunct railway stations that are no longer stops for passenger trains and therefore no longer tagged
as halt/stop in OSM. Finding alignments is a dynamic process that needs to be repeated periodically
because of changes in the data sources.</p>
        <sec id="sec-5-4-1">
          <title>5.2. Topology</title>
          <p>As a next step we want to align the topological connections between the operational points. In the
case of the operational points the topological connections between direct neighbours are available as
SectionOfLine entities. In the case of OSM we can derive a similar information by the OSMRelations
corresponding to train routes (Listing 3). In the QLever ontology all contained osm_nodes in a relation
are ordered with a member_pos property. The next passenger stop for a given node is then the next
passenger stop with a higher member_pos (not necessary sequential as there are also other type of
nodes and ways contained in the same relation).</p>
          <p>Listing 3: next passenger stops in OSM
CONSTRUCT {
? osm_id1 ex : nextPassengerStop ? osm_id2 .
? osm_id1 osmkey : name ? name1 .</p>
          <p>? osm_id2 osmkey : name ? name2 .
}
WHERE {
{</p>
          <p>SELECT ? rel ? m1 ? osm_id1 ? osm_pos1 ( MIN (? osm_pos2 ) AS ? min_pos2 ) WHERE {
BIND ( &lt;http s :// www . openstreetmap . org / relation /1658658 &gt; AS ? rel )
? rel osmrel : member ? m1 .
? m1 osmrel : member_id ? osm_id1 ;</p>
          <p>osmrel : member_pos ? osm_pos1 .
? osm_id1 a osm : node .
? osm_id1 osmkey : railway ? function1 .</p>
          <p>FILTER (? function1 != " platform ")
? rel osmrel : member ? m2 .
? m2 osmrel : member_id ? osm_id2 ;</p>
          <p>osmrel : member_pos ? osm_pos2 .
? osm_id2 a osm : node .
? osm_id2 osmkey : railway ? function2 .</p>
          <p>FILTER (? function2 != " platform ")
}</p>
          <p>FILTER (? osm_pos2 &gt; ? osm_pos1 )
}</p>
          <p>GROUP BY ? rel ? m1 ? osm_id1 ? osm_pos1
}
? rel osmrel : member ? m2 .
? m2 osmrel : member_id ? osm_id2 ;</p>
          <p>osmrel : member_pos ? min_pos2 .
? osm_id1 osmkey : name ? name1 .</p>
          <p>? osm_id2 osmkey : name ? name2 .</p>
        </sec>
        <sec id="sec-5-4-2">
          <title>5.3. Aligning infrastructure elements</title>
          <p>5.3.1. Tunnels</p>
        </sec>
      </sec>
      <sec id="sec-5-5">
        <title>For ERA the query looks like this: (Listing 4)</title>
        <p>Listing 4: Section of lines with tunnels
SELECT * WHERE {
? sol era : inCountry country : AUT .
? line a era : NationalRailwayLine .
? line rdfs : label " 20601 " .
? sol era : lineNationalId ? line .
? sol rdfs : label ? sol_label .
? tunnel a era : Tunnel .</p>
        <p>? tunnel era : netElement ? ne .</p>
        <p>To illustrate how to check the consistency of infrastructure elements with the integrated data, we
compare the queries for getting the sections of lines with tunnels and railway switches using OSM and
the ERA KG.
? tunnel rdfs : label ? tunnel_name .
? ne era : hasImplementation ? track_uri .
? track era : canonicalURI ? track_uri .
? sol era : track ? track .</p>
      </sec>
      <sec id="sec-5-6">
        <title>In the OSM variant we use the previously derived information nextStopPosition. A tunnel is found</title>
        <p>for a set of neighbouring nodes, if there is a OSMWay with the tag tunnel="yes" between the nodes.</p>
      </sec>
      <sec id="sec-5-7">
        <title>In contrast to the ERA KG variant this query finds also tunnels within operational points. Due to the meso scope of the ERA KG these tunnels are not represented in the ERA KG.</title>
        <p>Listing 5: Section of lines with tunnels
SELECT ? osm_id1 ? osm_id2 ? tunnel WHERE {</p>
        <p>BIND ( &lt;http s :// www . openstreetmap . org / relation /1658658 &gt; AS ? rel )
? osm_id1 ex : nextStopPosition ? osm_id2 .
? rel osmrel : member ? mrelway1 .
? mrelway1 osmrel : member_id ? osm_way1 .
? mrelway1 osmrel : member_pos ? way1_pos .
? osm_way1 osmway : member ? mway1 .
? mway1 osmway : member_id ? osm_id1 .
? rel osmrel : member ? mrelway2 .
? mrelway2 osmrel : member_id ? osm_way2 .
? mrelway2 osmrel : member_pos ? way2_pos .
? osm_way2 osmway : member ? mway2 .
? mway2 osmway : member_id ? osm_id2 .
{</p>
        <p>SELECT ? tunnel ? tunnel_name ? tunnel_pos {</p>
        <p>BIND ( &lt;http s :// www . openstreetmap . org / relation /1658658 &gt; AS ? rel )
? rel osmrel : member ? mtunnel .
? mtunnel osmrel : member_id ? tunnel .
? mtunnel osmrel : member_pos ? tunnel_pos .
? tunnel a osm : way .</p>
        <p>? tunnel osmkey : tunnel " yes " .</p>
        <p>}
}
FILTER (? tunnel_pos &gt; ? way1_pos )
FILTER (? tunnel_pos &lt; ? way2_pos )</p>
      </sec>
      <sec id="sec-5-8">
        <title>The label of the ERA tunnels and the tunnel:name tag of OSM are similar but the seldom match</title>
        <p>exactly. So to align the tunnels it is safer to use geo coordinates or topological information e.g. the ith
tunnel after operational point X.
5.3.2. Railway switches</p>
      </sec>
      <sec id="sec-5-9">
        <title>Railway switches are one of the most important elements of the railway network as they define the</title>
        <p>topology. They are not contained in the ERA KG so for this example we assume to have the information
as micro-level instance data of a RailML ontology or a similar ontology that uses the RTM for the
topological information. In RailML railway switches are explicitly modelled as the infrastructure
element SwitchIS3. RailML switches have additional properties that link the branches (Left, Right) of
the switch to the corresponding NetRelations on the RTM level.</p>
      </sec>
      <sec id="sec-5-10">
        <title>In OSM, detecting switches is more challenging. The SPARQL query shown in Listing 6 demonstrates</title>
        <p>how to retrieve all OSMNodes within a railway area that may correspond to infrastructure elements.</p>
      </sec>
      <sec id="sec-5-11">
        <title>3http://ontology.railml.org/railml3#SwitchIS</title>
        <p>Switches in OSM are optionally tagged with railway=switch and may include a corresponding ref
tag. Notably, OSMNodes representing switches are typically part of either two or three OSM ways
tagged with railway=rail, depending on whether they are located at the start/end of a rail segment
or between segments. This structural information can be leveraged to identify switches in OSM, even
when explicit switch tags are absent.</p>
        <p>Listing 6: Switches with osm ref
SELECT DISTINCT ? osm_node ? way_count ? function ? ref WHERE {
{</p>
        <p>SELECT ? osm_node ( COUNT (? way ) AS ? way_count ) WHERE {
? feldkirch osmkey : name " Feldkirch " .
? feldkirch osmkey : railway " station " .
? feldkirch osmkey : railway : ref " Fk " .
? railway_area ogc : sfContains ? feldkirch .
? railway_area osmkey : landuse " railway " .
? railway_area ogc : sfContains ? osm_node .
? way osmway : member ? mway .
? way osmkey : railway " rail " .</p>
        <p>? mway osmway : member_id ? osm_node .
}</p>
        <p>GROUP BY ? osm_node
}
OPTIONAL {</p>
        <p>? osm_node osmkey : railway ? function .
}
OPTIONAL {</p>
        <p>? osm_node osmkey : ref ? ref .
}
}</p>
      </sec>
      <sec id="sec-5-12">
        <title>Aligning the identified OSM switches with the RTM-based switches presents a greater challenge. To</title>
        <p>establish a one-to-one alignment, it is essential to ensure that the same context is used in both RTM and
OSM. In RTM, infrastructure elements are explicitly linked to their corresponding operational points. In
contrast, OSM does not provide this information directly; it must be inferred—such as in the query shown
in Listing 6–by identifying all nodes contained within a relation tagged with landuse="railway".</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Conclusion</title>
      <p>The purpose of this paper is to share our experience that identifying instance alignments in the railway
domain can be a challenging task, particularly when the ontologies difer significantly in their modelling
philosophies. One-to-one alignments are often not feasible, as certain concepts may be absent in one
of the formalisms. Surprisingly, even when ontologies share the same underlying model for topology
(e.g., RTM), alignment remains dificult due to the various ways in which data can be represented—such
as diferences in symmetry, granularity, or alternative location information (e.g., metric vs. GPS
coordinates). This challenge persists even when the same ontology is used.</p>
      <sec id="sec-6-1">
        <title>In our experience, alignments can be efectively achieved with a human-in-the-loop approach, where</title>
        <p>domain experts leverage a combination of geographical, topological, and railway-specific knowledge
to determine corresponding infrastructure elements. However, manual alignment is a tedious and
time-consuming process, especially when it must be repeated periodically due to changes in the railway
infrastructure—although the railway network tends to be relatively stable.</p>
      </sec>
      <sec id="sec-6-2">
        <title>Motivated by these challenges, our research aims to develop improved semi-automatic methods for integrating railway data from heterogeneous sources. We are working on an approach on combining topological and geographical reasoning with alignment techniques such as graph-based and constraintbased mapping algorithms.</title>
        <p>During the preparation of this work, the authors used Sonnet 4.0 in order to: paraphrase and reword,
improve writing style, and grammar and check spelling. After using these tool, the authors reviewed
and edited the content as needed and take full responsibility for the publication’s content.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Camarazo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Roxin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lalou</surname>
          </string-name>
          , Railway Systems'
          <article-title>Ontologies: A Literature Review and an Alignment Proposal</article-title>
          ,
          <source>in: Information Integration and Web Intelligence</source>
          , volume
          <volume>15342</volume>
          <source>of LNCS</source>
          ,
          <year>2025</year>
          , pp.
          <fpage>311</fpage>
          -
          <lpage>319</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>031</fpage>
          -78090-5_
          <fpage>27</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Verstichel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ongenae</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Loeve</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Vermeulen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Dings</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Dhoedt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Dhaene</surname>
          </string-name>
          , F. De Turck,
          <article-title>Eficient data integration in the railway domain through an ontology-based methodology</article-title>
          ,
          <source>Transportation Research Part C: Emerging Technologies</source>
          <volume>19</volume>
          (
          <year>2011</year>
          )
          <fpage>617</fpage>
          -
          <lpage>643</lpage>
          . doi:
          <volume>10</volume>
          .1016/j.trc.
          <year>2010</year>
          .
          <volume>10</volume>
          .003.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Arp</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Spear</surname>
          </string-name>
          ,
          <article-title>Building Ontologies with Basic Formal Ontology</article-title>
          , MIT Press,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>S.</given-names>
            <surname>Bischof</surname>
          </string-name>
          , G. Schenner, Rail Topology Ontology:
          <article-title>A Rail Infrastructure Base Ontology</article-title>
          ,
          <source>in: ISWC</source>
          <year>2021</year>
          , volume
          <volume>12922</volume>
          <source>of LNCS</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>597</fpage>
          -
          <lpage>612</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -88361-4_
          <fpage>35</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>C.</given-names>
            <surname>Rahmig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Richter</surname>
          </string-name>
          ,
          <article-title>A railway simulation landscape creation tool chain considering openstreetmap geo data</article-title>
          ,
          <source>in: SUMO2014 - Modeling Mobility with Open Data</source>
          ,
          <year>2014</year>
          , pp.
          <fpage>167</fpage>
          -
          <lpage>175</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>[6] UIC, RailTopoModel - Railway infrastructure topological model</article-title>
          , Standard,
          <source>International Railway Solution IRS</source>
          <volume>30100</volume>
          :
          <year>2016</year>
          , International Union of Railway (UIC),
          <year>2016</year>
          .
          <source>Edition: 1 ISBN: 978-2-7461- 2513-1.</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Nash</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Huerlimann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schuette</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. P.</given-names>
            <surname>Krauss</surname>
          </string-name>
          , RailML
          <article-title>- A Standard Data Interface For Railroad Applications</article-title>
          ,
          <source>WIT Transactions on The Built Environment</source>
          <volume>74</volume>
          (
          <year>2004</year>
          )
          <fpage>233</fpage>
          -
          <lpage>240</lpage>
          . doi:
          <volume>10</volume>
          .2495/CR040241.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Rojas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Aguado</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Vasilopoulou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Velitchkov</surname>
          </string-name>
          ,
          <string-name>
            <surname>D. Van Assche</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Colpaert</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Verborgh</surname>
          </string-name>
          ,
          <article-title>Leveraging Semantic Technologies for Digital Interoperability in the European Railway Domain</article-title>
          ,
          <source>in: ISWC</source>
          <year>2021</year>
          , volume
          <volume>12922</volume>
          <source>of LNCS</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>648</fpage>
          -
          <lpage>664</lpage>
          . doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>030</fpage>
          -88361-4_
          <fpage>38</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>H.</given-names>
            <surname>Bast</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Brosi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kalmbach</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Lehmann</surname>
          </string-name>
          ,
          <article-title>An Eficient RDF Converter and SPARQL Endpoint for the Complete OpenStreetMap Data</article-title>
          ,
          <source>in: Proceedings of the 29th International Conference on Advances in Geographic Information Systems</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>536</fpage>
          -
          <lpage>539</lpage>
          . doi:
          <volume>10</volume>
          .1145/3474717.3484256.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>