﻿{"id":3292,"date":"2016-06-01T13:59:09","date_gmt":"2016-06-01T12:59:09","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=3292"},"modified":"2016-06-01T13:59:09","modified_gmt":"2016-06-01T12:59:09","slug":"developper-une-application-avec-pgrouting-sous-windows-3lalgorithme-dijkstra","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-3lalgorithme-dijkstra\/","title":{"rendered":"D\u00e9velopper une application avec pgrouting sous Windows (3):l\u2019algorithme Dijkstra"},"content":{"rendered":"<p>L&rsquo;algorithme de Dijkstra prend en entr\u00e9e un graphe orient\u00e9 pond\u00e9r\u00e9 par des r\u00e9els positifs et un sommet source. Il s&rsquo;agit de construire progressivement un sous-graphe dans lequel sont class\u00e9s les diff\u00e9rents sommets par ordre croissant de leur distance minimale au sommet de d\u00e9part. La distance correspond \u00e0 la somme des poids des arcs emprunt\u00e9es.<!--more--><\/p>\n<p>La syntaxe de l\u2019algorithme Dijkstra est la suivante:<\/p>\n<p><strong>pgr_dijkstrar(sql <\/strong>text<strong>, source <\/strong>integer<strong>, target <\/strong>integer<strong>,directed <\/strong>boolean<strong>);<\/strong><\/p>\n<p>O\u00f9 <em><strong>source<\/strong> <\/em>est le point de d\u00e9part souhait\u00e9 de l\u2019itin\u00e9raire, <em><strong>target<\/strong> <\/em>le point d\u2019arriv\u00e9e de l\u2019itin\u00e9raire et la cha\u00eene sql est de type:<\/p>\n<p><strong>SELECT id, source, target, cost [,reverse_cost] FROM r\u00e9seau<\/strong><\/p>\n<p>La variable bool\u00e9enne \u00ab\u00a0directed\u00a0\u00bb permet la prise en compte des voies \u00e0 sens unique. Par d\u00e9faut elle est \u00ab\u00a0true\u00a0\u00bb.<\/p>\n<p>La commande retourne un ensemble d&rsquo;\u00e9l\u00e9ments (seq, path_seq [, start_vid] [, end_vid], node, <a href=\"https:\/\/www.sigterritoires.fr\/index.php\/cartes-enc-dans-qgis-avec-postgis1\/\">edge<\/a>, cost, agg_cost). Contrairement \u00e0 l&rsquo;algorithme A*, o\u00f9 on a un point de d\u00e9part et un points d&rsquo;arriv\u00e9e pour l&rsquo;itin\u00e9raire, l&rsquo;algorithme de Dijstra admet plusieurs points d&rsquo;entr\u00e9e et de sortie.<\/p>\n<p>Dans l&rsquo;ensemble de sortie, <em><strong>seq<\/strong> <\/em>est le num\u00e9ro d&rsquo;ordre du segment dans l&rsquo;ensemble global, <em><strong>path_seq<\/strong><\/em> est le num\u00e9ro d&rsquo;ordre du segment dans l&rsquo;itin\u00e9raire, <em><strong>start_vid<\/strong><\/em> et <em><strong>end_vid<\/strong><\/em> correspondent au point de d\u00e9part et d&rsquo;arriv\u00e9e de l&rsquo;itin\u00e9raire et ne sont renseign\u00e9s que s&rsquo;il y a plusieurs <em><strong>source<\/strong><\/em> ou <em><strong>target<\/strong> <\/em>en param\u00e8tre de l&rsquo;algorithme, <em><strong>node<\/strong> <\/em>et <em><strong>edge<\/strong> <\/em>sont les points de d\u00e9but et fin du tron\u00e7on consid\u00e9r\u00e9, <em><strong>cost<\/strong> <\/em>est le co\u00fbt du tron\u00e7on et <em><strong>agg_cost<\/strong><\/em> est le co\u00fbt cumul\u00e9 depuis le d\u00e9part de l&rsquo;itin\u00e9raire.<\/p>\n<h2>Choix du \u201cco\u00fbt\u201d d\u2019un tron\u00e7on.<\/h2>\n<p>L\u2019algorithme de routage recherche le chemin avec le co\u00fbt le plus faible. En fonction de vos objectifs, vous devez d\u00e9cider quel \u00e9l\u00e9ment de co\u00fbt vous allez prendre en charge.<\/p>\n<p>Reprenons notre base OpensStreetMap. Vous avez un champ \u201ccost\u201d qui reprend la longueur du tron\u00e7on en degr\u00e9s. Si vous utilisez ce champ dans l\u2019algorithme Dijkstra comme valeur de co\u00fbt, l\u2019itin\u00e9raire propos\u00e9 sera le plus court chemin entre les deux points choisis. Voyons un exemple.<\/p>\n<p>La commande suivante calcule l\u2019itin\u00e9raire entre les points 69072 et 64204 en utilisant le champ \u201ccost\u201d qui correspond \u00e0 la longueur du tron\u00e7on.<\/p>\n<p>SELECT seq, path_seq, node,\u00a0 edge,di.cost, agg_cost, the_geom<br \/>\nFROM pgr_dijkstra(<br \/>\n&lsquo;SELECT gid as id, source, target, cost, reverse_cost FROM public.ways&rsquo;,<br \/>\n69072, 64204, false\u00a0 ) as di<br \/>\nJOIN public.ways ways_vertices_pgr<br \/>\nON di.edge = ways_vertices_pgr.gid ;<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3297\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-3lalgorithme-dijkstra\/4pg3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3.png?fit=1319%2C685&amp;ssl=1\" data-orig-size=\"1319,685\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4pg3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3.png?fit=640%2C333&amp;ssl=1\" class=\"aligncenter size-large wp-image-3297\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3-1024x532.png?resize=640%2C332\" alt=\"4pg3\" width=\"640\" height=\"332\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3.png?resize=1024%2C532&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3.png?resize=300%2C156&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3.png?resize=768%2C399&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3.png?resize=1200%2C623&amp;ssl=1 1200w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg3.png?w=1319&amp;ssl=1 1319w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>Le r\u00e9sultat, une fois charg\u00e9 dans QGis est le m\u00eame que pour l&rsquo;algorithme A*<\/p>\n<h2><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3295\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-3lalgorithme-dijkstra\/4pg2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png?fit=1539%2C859&amp;ssl=1\" data-orig-size=\"1539,859\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4pg2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png?fit=640%2C358&amp;ssl=1\" class=\"aligncenter size-large wp-image-3295\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2-1024x572.png?resize=640%2C357\" alt=\"r\u00e9sultat dans QGis de l'algorithme de Dijkstra\" width=\"640\" height=\"357\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png?resize=1024%2C572&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png?resize=300%2C167&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png?resize=768%2C429&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png?resize=1200%2C670&amp;ssl=1 1200w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png?w=1539&amp;ssl=1 1539w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg2.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Probl\u00e8mes<\/h2>\n<p>Par rapport \u00e0 l&rsquo;algorithme A*, vous remarquerez qu&rsquo;il y a moins besoin de mise en forme de la table de la couche r\u00e9seau. Par contre, si vous utilisez les champs cost_s et reverse_cost_s, vous aurez les m\u00eames messages d&rsquo;erreur s&rsquo;il y a des valeurs nulles. Reportez vous \u00e0 l&rsquo;article pr\u00e9c\u00e9dent (<a href=\"http:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-2lalgorithme-a-star\/\">D\u00e9velopper une application avec pgrouting sous Windows (2):l\u2019algorithme A*<\/a>) pour r\u00e9soudre ces probl\u00e8mes.<\/p>\n<p>Pour cet article nous utilisons la version 2.2.3 de <a href=\"https:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-1\/\">pgrouting<\/a>. Si vous utilisez des versions ant\u00e9rieures vous pouvez rencontrer un probl\u00e8me de type de champ <em><strong>source<\/strong> <\/em>et <em><strong>target<\/strong> <\/em>de votre base de donn\u00e9es:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg4.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3299\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-3lalgorithme-dijkstra\/4pg4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg4.png?fit=705%2C187&amp;ssl=1\" data-orig-size=\"705,187\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4pg4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg4.png?fit=640%2C170&amp;ssl=1\" class=\"aligncenter size-full wp-image-3299\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg4.png?resize=640%2C170\" alt=\"erreur des versions ant\u00e9rieures de pgrouting\" width=\"640\" height=\"170\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg4.png?w=705&amp;ssl=1 705w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg4.png?resize=300%2C80&amp;ssl=1 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>En effet, si le nombre de n\u0153uds de votre r\u00e9seau est trop important, les champs <em><strong>source<\/strong> <\/em>et <em><strong>target<\/strong> <\/em>peuvent \u00eatre de type bigint. Les versions ant\u00e9rieures de pgrouting ne prenaient pas en compte ce type d&rsquo;entier.<\/p>\n<p>V\u00e9rifiez votre version avec la requ\u00eate SQL<\/p>\n<p><strong>SELECT pgr_version();<\/strong><\/p>\n<h2>Itin\u00e9raires multiples<\/h2>\n<p>Voici un exemple de calcul d&rsquo;itin\u00e9raire avec trois points de d\u00e9part et un points d&rsquo;arriv\u00e9e:<\/p>\n<p>SELECT seq, path_seq, start_vid, node,\u00a0 edge,di.cost, agg_cost, the_geom<br \/>\nFROM pgr_dijkstra(<br \/>\n&lsquo;SELECT gid as id, source, target, cost_s as cost, reverse_cost_s as reverse_cost FROM public.ways&rsquo;,<br \/>\n<strong>ARRAY[69072,21576,62667]<\/strong>, 64204, true\u00a0 ) as di<br \/>\nJOIN public.ways ways_vertices_pgr<br \/>\nON di.edge = ways_vertices_pgr.gid ;<\/p>\n<p>Cette requ\u00eate calcule les itin\u00e9raires entre les points de d\u00e9part\u00a069072, 21576 et 62667 et le point d&rsquo;arriv\u00e9e 64204<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3301\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-3lalgorithme-dijkstra\/4pg5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5.png?fit=1315%2C679&amp;ssl=1\" data-orig-size=\"1315,679\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4pg5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5.png?fit=640%2C331&amp;ssl=1\" class=\"aligncenter size-large wp-image-3301\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5-1024x529.png?resize=640%2C331\" alt=\"requ\u00eate avec points de d\u00e9part multiples\" width=\"640\" height=\"331\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5.png?resize=1024%2C529&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5.png?resize=300%2C155&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5.png?resize=768%2C397&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5.png?resize=1200%2C620&amp;ssl=1 1200w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg5.png?w=1315&amp;ssl=1 1315w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Le r\u00e9sultat, une fois charg\u00e9 dans QGis est le suivant<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3302\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-3lalgorithme-dijkstra\/4pg6\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png?fit=1533%2C853&amp;ssl=1\" data-orig-size=\"1533,853\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4pg6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png?fit=640%2C356&amp;ssl=1\" class=\"aligncenter size-large wp-image-3302\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6-1024x570.png?resize=640%2C357\" alt=\"r\u00e9sultat dans QGis du calcul d'itin\u00e9raires multiples\" width=\"640\" height=\"357\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png?resize=1024%2C570&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png?resize=300%2C167&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png?resize=768%2C427&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png?resize=1200%2C668&amp;ssl=1 1200w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png?w=1533&amp;ssl=1 1533w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg6.png?w=1280&amp;ssl=1 1280w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<h2>Variante pgr_dijkstraCost<\/h2>\n<p>Vous disposez d&rsquo;une variante de l&rsquo;algorithme Dijkstra avec laquelle vous donnez le point de d\u00e9part et le point d&rsquo;arriv\u00e9e et en retour vous r\u00e9cup\u00e9rez simplement le co\u00fbt total du trajet.<\/p>\n<p>Voici un exemple avec le trajet entre les points 69072 et 64204<\/p>\n<p>SELECT * FROM pgr_dijkstraCost(<br \/>\n&lsquo;SELECT gid as id, source, target, cost_s as cost, reverse_cost_s as reverse_cost FROM public.ways&rsquo;,<br \/>\n69072, 64204) ;<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg7.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3306\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/developper-une-application-avec-pgrouting-sous-windows-3lalgorithme-dijkstra\/4pg7\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg7.png?fit=1073%2C551&amp;ssl=1\" data-orig-size=\"1073,551\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"4pg7\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg7.png?fit=640%2C329&amp;ssl=1\" class=\"aligncenter size-large wp-image-3306\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg7-1024x526.png?resize=640%2C328\" alt=\"exemple de pgr_dijkstraCost\" width=\"640\" height=\"328\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg7.png?resize=1024%2C526&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg7.png?resize=300%2C154&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg7.png?resize=768%2C394&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/05\/4pg7.png?w=1073&amp;ssl=1 1073w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>L&rsquo;algorithme de Dijkstra prend en entr\u00e9e un graphe orient\u00e9 pond\u00e9r\u00e9 par des r\u00e9els positifs et un sommet source. Il s&rsquo;agit de construire progressivement un sous-graphe dans lequel sont class\u00e9s les diff\u00e9rents sommets par ordre croissant de&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[311,62],"tags":[331,330,327,326,227,312,58],"class_list":["post-3292","post","type-post","status-publish","format-standard","hentry","category-postgresql","category-qgis-2","tag-algorithme","tag-dijkstra","tag-itineraire","tag-pgrouting","tag-postgis","tag-postgresql","tag-qgis"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-R6","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/3292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=3292"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/3292\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=3292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=3292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=3292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}