Versiones soportadas: latest (3.8) 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 main dev
Versiones no soportadas:2.6 2.5 2.4 2.3 2.2 2.1 2.0

Tabla de Contenido

pgRouting extiende la base de datos geospacial de PostGIS/PostgreSQL para proporcionar enrutamiento geoespacial y otras funciones de análisis de red.

Este es el manual para la version v4.0.0-dev de pgRouting.

Licencia de Creative Commons Attribution-Share Alike 3.0

El Manual de pgRouting está bajo licencia Creative Commons Attribution-Share Alike 3.0 License. Siéntase libre de usar este material de la manera que desee, pero le pedimos que atribuya el crédito correspondiente al proyecto pgRouting y, siempre que sea posible, visite https://pgrouting.org. Para otras licencias utilizadas en pgRouting, consulte la página Licencias .

General

Conceptos de pgRouting

Familias de Funciones

Todos los Pares - Familia de Funciones

A* - Familia de Funciones

A* Bidireccional - Familia de Funciones

  • pgr_bdAstar - Algoritmo bidireccional A* para obtener rutas.

  • pgr_bdAstarCost - Algoritmo bidireccional A* para calcular el coste de las rutas.

  • pgr_bdAstarCostMatrix - Algoritmo bidireccional A* para calcular una matriz de costes de rutas.

Bidirectional Dijkstra - Familia de funciones

  • pgr_bdDijkstra - Algoritmo Dijkstra bidireccional para las rutas más cortas.

  • pgr_bdDijkstraCost - Dijkstra bidireccional para calcular el costo de las rutas más cortas

  • pgr_bdDijkstraCostMatrix - Algoritmo bidireccional de Dijkstra para crear una matriz de costes de las rutas más cortas.

Componentes - Familia de funciones

Contraction - Familia de funciones

Dijkstra - Familia de funciones

  • pgr_dijkstra - Algoritmo de Dijkstra para las rutas más cortas.

  • pgr_dijkstraCost - Obtener el costo agregado de las rutas más cortas.

  • pgr_dijkstraCostMatrix - Usar pgr_dijkstra para crear una matriz de costes.

  • pgr_drivingDistance - Usar pgr_dijkstra para calcular información de captación.

  • pgr_KSP - Usar el algoritmo Yen con pgr_dijkstra para obtener las K rutas más cortas.

Flow - Familia de funciones

  • pgr_maxFlow - Solo el flujo máximo se calcula usando el algoritmo empuja y reetiquetado.

  • pgr_boykovKolmogorov - Algoritmo Boykov y Kolmogorov con detalles del flujo en aristas.

  • pgr_edmondsKarp - Algoritmo Edmonds y Karp con detalles de flujo del flujo en aristas.

  • pgr_pushRelabel - Algoritmo empuja y reetiquetado con detalles del flujo en aristas.

  • Aplicaciones

Kruskal - Familia de funciones

Métricas - Familia de funciones

  • pgr_degree - Regresa un conjunto de vertices y la cantidad de aristas incidentes al vértice.

Prim - Familia de funciones

Referencia

TRSP - Familia de funciones

Vendedor Viajante - Familia de funciones

  • pgr_TSP - Cuando la entrada es la información de celdas de una matriz.

  • pgr_TSPeuclidean - Cuando la información son coordenadas.

Utility functions

Funciones por categorías

Costo - Categoría

Cost Matrix - Categoría

Distancia Manejando - Categoría

  • pgr_drivingDistance - Distancia de Manejo basada en el algoritmo de Dijkstra

  • pgr_primDD - Distancia de manejo basada en el algoritmo de Prim

  • pgr_kruskalDD - Distancia de Manejo basada en el algoritmo de Kruskal

Rutas más cortas K - Categoría

  • pgr_KSP - Algoritmo de Yen basado en pgr_dijkstra

Árbol de expansión - Categoría

BFS - Categoría

DFS - Categoría

Funciones disponibles pero no oficiales de pgRouting

Notas de versión

Notas de la versión de pgRouting 4.0.0

Para ver todos los problemas y solicitudes de extracción cerrados para ésta versión, consulte la meta cerrada 4.0.0

Funciones promovidas a oficial

  • pgr_trsp

  • pgr_trspVia

  • pgr_trspVia_withPoints

  • pgr_trsp_withPoints

  • #2905 pgr_withPoints

    • Output columns standardized to (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)

    • Función promovida a oficial.

    • Signature change: driving_side parameter changed from named optional to unnamed positional.

      • Directed graph valid values: l or L and r, R

      • Undirected graph valid values: b or B

  • #2905 pgr_withPointsCost

    • Función promovida a oficial.

    • Output columns standardized to (start_vid, end_vid, agg_cost)

    • Signature change: driving_side parameter changed from named optional to unnamed positional.

      • Directed graph valid values: l or L and r, R

      • Undirected graph valid values: b or B

  • #2905 pgr_withPointsCostMatrix

    • Función promovida a oficial.

    • Output columns standardized to (start_vid, end_vid, agg_cost)

    • Signature change: driving_side parameter changed from named optional to unnamed positional.

      • Directed graph valid values: l or L and r, R

      • Undirected graph valid values: b or B

  • pgr_withPointsDD

  • pgr_withPointsKSP

  • pgr_withPointsVia

Firmas promovidas a oficial

#2718

Make official the Combinations signature on the official functions

  • pgr_aStar(Combinaciones)

  • pgr_aStarCost(Combinaciones)

  • pgr_bdAstar(Combinaciones)

  • pgr_bdAstarCost(Combinaciones)

  • pgr_bdDijkstra(Combinaciones)

  • pgr_bdDijkstraCost(Combinaciones)

  • pgr_dijkstra(Combinaciones)

  • pgr_dijkstraCost(Combinaciones)

  • pgr_KSP(todas las firmas)

  • pgr_boykovKolmogorov(Combinaciones)

  • pgr_edmondsKarp(Combinaciones)

  • pgr_maxFlow(Combinaciones)

  • pgr_pushRelabel(Combinaciones)

SQL signatures and output standardization

#2904 Standardize output columns of functions with different output columns within overloads

Official functions

  • #2905

    pgr_withPoints

    • Output columns standardized to (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)

    • Función promovida a oficial.

    • Signature change: driving_side parameter changed from named optional to unnamed positional.

      • Directed graph valid values: l or L and r, R

      • Undirected graph valid values: b or B

  • #2906 pgr_bdDijkstra

    • Output columns standardized to (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)

    • Firmas de combinaciones promovidas a oficial.

Funciones experimentales

  • #2907 pgr_bellmanFord

    • Output columns standardized to (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)

  • #2908 pgr_binaryBreadthFirstSearch

    • Output columns standardized to (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)

  • #2910 pgr_edwardMoore

    • Output columns standardized to (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)

  • #2913 pgr_DAGshortestPath

    • Output columns standardized to (seq, path_seq, start_vid, end_vid, node, edge, cost, agg_cost)

Removal of SQL deprecated signatures

  • #2798: pgr_contraction

    • pgr_contraction(text,bigint[],integer,bigint[],boolean)

  • #2683: pgr_trsp

    • pgr_trsp(text,integer,integer,boolean,boolean,text)

    • pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text)

  • #2888: pgr_findCloseEdges

    • pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean)

    • pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean)

  • #2890: pgr_withPointsDD

    • pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)

    • pgr_withpointsdd(text,text,bigint,double precision,boolean,character,boolean)

  • #2895: pgr_withPointsKSP

    • pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,character,boolean)

  • #2899: pgr_maxCardinalityMatch

    • pgr_maxcardinalitymatch(text,boolean)

  • #2901: TSP family

    • pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)

    • pgr_tspeuclidean(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)

Eliminación de funciones obsoletas

  • #2681: pgr_trspviaedges

  • #2682: pgr_trspviavertices

  • #2748: pgr_alphaShape

  • #2751: pgr_createTopology

  • #2752: pgr_analyzeGraph

  • #2755: pgr_analyzeOneWay

  • #2827: pgr_createVerticesTable

  • #2886: pgr_nodeNetwork

rubric:: Removal of SQL deprecated internal functions

Related issues: #2897

  • _pgr_dijkstranear(text,anyarray,anyarray,bigint,boolean)

  • _pgr_dijkstranear(text,anyarray,bigint,bigint,boolean)

  • _pgr_dijkstranear(text,bigint,anyarray,bigint,boolean)

  • _pgr_dijkstra(text,anyarray,anyarray,boolean,boolean,boolean,bigint)

  • _pgr_dijkstra(text,text,boolean,boolean,boolean)

  • _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)

  • _pgr_ksp(text,anyarray,anyarray,integer,boolean,boolean,boolean)

  • _pgr_ksp(text,bigint,bigint,integer,boolean,boolean)

  • _pgr_ksp(text,text,integer,boolean,boolean)

  • _pgr_kruskal(text,anyarray,text,bigint,double precision)

  • _pgr_maxcardinalitymatch(text,boolean)

  • _pgr_prim(text,anyarray,text,bigint,double precision)

  • _pgr_trsp(text,integer,double precision,integer,double precision,boolean,boolean,text)

  • _pgr_trsp(text,text,anyarray,anyarray,boolean)

  • _pgr_trsp(text,text,anyarray,bigint,boolean)

  • _pgr_trsp(text,text,bigint,anyarray,boolean)

  • _pgr_trsp(text,text,bigint,bigint,boolean)

  • _pgr_trspviavertices(text,integer[],boolean,boolean,text)

  • _pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)

  • _pgr_withpointsksp(text,text,anyarray,anyarray,integer,character,boolean,boolean,boolean,boolean)

  • _pgr_withpointsksp(text,text,bigint,bigint,integer,boolean,boolean,character,boolean)

  • _pgr_withpointsksp(text,text,text,integer,character,boolean,boolean,boolean)

  • _pgr_withpointsvia(text,bigint[],double precision[],boolean)

  • _trsp(text,text,anyarray,anyarray,boolean)

  • _v4trsp(text,text,anyarray,anyarray,boolean)

  • _v4trsp(text,text,text,boolean)

  • _pgr_tspeuclidean(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)

  • _pgr_tsp(text,bigint,bigint,double precision,integer,integer,integer,double precision,double precision,double precision,boolean)

  • #2913 _pgr_dagshortestpath(text,text,boolean,boolean)

  • #2913 _pgr_dagshortestpath(text,anyarray,anyarray,boolean,boolean)

  • #2861: Remove unused internal functions

    • _pgr_checkverttab(text,text[],integer,text)

    • _pgr_createindex(text,text,text,integer,text)

    • _pgr_createindex(text,text,text,text,integer,text)

    • _pgr_endpoint(geometry)

    • _pgr_getcolumnname(text,text,integer,text)

    • _pgr_getcolumnname(text,text,text,integer,text)

    • _pgr_getcolumntype(text,text,integer,text)

    • _pgr_getcolumntype(text,text,text,integer,text)

    • _pgr_gettablename(text,integer,text)

    • _pgr_iscolumnindexed(text,text,integer,text)

    • _pgr_iscolumnindexed(text,text,text,integer,text)

    • _pgr_iscolumnintable(text,text)

    • _pgr_msg(integer,text,text)

    • _pgr_onerror(boolean,integer,text,text,text,text)

    • _pgr_pointtoid(geometry,double precision,text,integer)

    • _pgr_quote_ident(text)

    • _pgr_startpoint(geometry)

    • _pgr_versionless(text,text)

Code enhancements

  • Eliminación de código C/C++ no utilizado

  • Refactor the Script to build the update PostgreSQL file.

  • One driver for:

    • allpairs: johnson and Flowy-Warshall

    • Shortest path: Dijkstra and withPoints using Dijkstra

Obsolescencia de funciones internas C/C++

  • _pgr_drivingdistance(text,anyarray,double precision,boolean,boolean)

  • _pgr_kruskal(text,anyarray,text,bigint,double precision)

  • _pgr_prim(text,anyarray,text,bigint,double precision)

Funciones C/C++ internas en legado

  • _trsp(text,text,anyarray,anyarray,boolean)

  • _v4trsp(text,text,anyarray,anyarray,boolean)

  • _v4trsp(text,text,text,boolean)

  • _pgr_withpointsdd(text,text,anyarray,double precision,boolean,character,boolean,boolean)

  • #2913 _pgr_dagshortestpath

Todas las versiones

Índices y tablas