routing in qgis...2011/05/06 · pgrouting create or replace function shortest_path(sql text,...
TRANSCRIPT
Routing mit QGIS
pgRouting und Roadgraph Plugin
Routing
Shortest Path
pgRouting shortest_path()
RoadGraph Plugin
Roadgraph Plugin
Plugin-Homepage: http://gis-lab.info/qa/road-graph-eng.html
Kürzeste Route zwischen zwei Punkten über einen beliebigen Polyline-Layer
Roadgraph Plugin
ReisezeitStreckenlänge
LayerFahrtrichtungen
Geschwindigkeit
Roadgraph Plugin
Roadgraph Plugin
+ relativ einfache Installation+ beliebige Linien-Layer+ berücksichtigt Einbahnen
- langsam- Snappingprobleme bei Start- und Endpunkten
pgRouting
Projekt-Homepage: http://www.pgrouting.org/
Routingerweiterung für PostGIS
Shortest Path DijkstraShortest Path A-StarShortest Path Shooting-StarTraveling Salesperson Problem Driving Distance calculation
pgRouting
CREATE OR REPLACE FUNCTION shortest_path( sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean)RETURNS SETOF path_result;
sql:
SELECT id, source, target, cost FROM edge_table;
pgRouting
Voraussetzungen:
Kanten-Tabelle mit Kanten-IDStart- und Endknoten-IDKosten
LängeReisezeitTreibstoffverbrauchC02...
pgRouting
Bsp: kürzeste Route von Knoten #1 nach #5110
SELECT * FROM shortest_path(' SELECT gid AS id, start_id::int4 AS source, end_id::int4 AS target, shape_leng::float8 AS cost FROM network',1,5110,false,false)
pgRouting
pgRouting
+ schnell+ unterschiedliche Algorithmen (Heuristiken, Abbiegebeschränkungen, TSP, ...)
- Installationsaufwand (PostgreSQL, PostGIS, pgRouting)- kein GUI- Topologie notwendig- Knoten-IDs müssen vom Typ int4 sein
Anwendungsmöglichkeiten