Wiki page
[VirtualRouting] by
sandro
2018-03-22 17:41:42.
D 2018-03-22T17:41:42.808
L VirtualRouting
U sandro
W 2797
<a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=4.3.0-doc">back</a><hr><br>
<h1>Introduction</h1>
Previous versions of SpatiaLite traditionally supported a <b>pure SQL routing module</b> that was named <a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=VirtualNetwork+reloaded">VirtualNetwork</a>.<br><br>
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 href="https://en.wikipedia.org/wiki/Graph_theory">Graph theory</a> and more precisely on <b>Weighted Graphs</b>.
<br>
<img href="http://www.gaia-gis.it/gaia-sins/network.png" 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 <b>Nodes</b>.</li>
<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 <b>Nodes</b>.</li>
<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 <b>Nodes</b>.</li>
<li>All references to the same <b>Node</b> by different Links <b>must</b> exactly coincide.</li>
</ul>
fava
<hr><br>
<a href="https://www.gaia-gis.it/fossil/libspatialite/wiki?name=4.3.0-doc">back</a
Z e08b6a0422e2fe48771f2d76f5e89d8b