<a
<h1>Introduction</h1>
Previous versions of SpatiaLite traditionally supported a <b>pure SQL routing module</b> that was named <a
Since version <b>5.0.0</b> a brand new <b>routing module</b> (more advanced and sophisticated) is now available, that is named <b>VirtualRouting</b>.<br>
The nowadays obsolete <b>VirtualNetwork</b> still continues to be supported by version <b>5.0.0</b> so to not cause an abrupt break to already existing applications, but will be presumably suppressed in future versions.<br>
Using <b>VirtualRouting</b> instead of <b>VirtualNetwirk</b> is warmly reccommended for any new development.
<h2>Teoretical foundations - an ultra-quick recall</h2>
All <b>Routing algorithms</b> (<i>aka</i> <b>Shortest Path</b> algorithms) are based on the mathematics of the <a theory</a> and more precisely on <b>Weighted Graphs</b>.
<br>
<img alt="network">
<br>
A topologically valid <b>Network</b> is a dataset fullfilling the following requirements:
<ul>
<li>All items in the dataset are called <b>Links</b> (<i>aks</i> <b>Arcs</b>), and are expected to represent some oriented conection joining two
<li>So all <b>Links</b> are always expected to explicitly reference a <b>Start-Node</b> (<i>aks</i> <b>Node-From</b>) and an <b>End-Node</b> (<i>aka</i> <b>Node-To</b>).<br>
The <b>Start-</b> and <b>End-Node</b> could eventually be the same, and in this case we'll have a <b>self-closed Link</b>.<br>
Network's Links <b>can</b> eventually define a linear Geometry (<b>LINESTRING</b>) going from the <b>Start-Node</b> to the <b>End-Node</b>, but this is an optional feature, not a mandatory requirement.<br>
What is absolutely mandatory is that each <b>Link</b> must explicitly reference its
<li>A Network supporting Geometries is a <b>Spatial Network</b>; otherwise a Network lacking any geometry is a <b>Logical Network</b>.<br>
In a <b>Spatial Network</b> all Links <b>must</b> have a corresponding Geometry.<br>
In a <b>Logical Network</b> all Links <b>are strictly forbidden</b> to have any geometry.</li>
<li>In a <b>Spatial Network</b> both the <b>StartPoint</b> and <b>EndPoint</b> of each Link's <b>LINESTING</b> are always expected to exactly coincide with the corresponding
<li>All references to the same <b>Node</b> by different Links <b>must</b> exactly coincide.</li>
</ul>
fava

<hr><br>
<a