routing in qgis...2011/05/06  · pgrouting create or replace function shortest_path(sql text,...

14
Routing mit QGIS pgRouting und Roadgraph Plugin

Upload: others

Post on 06-Jun-2020

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

Routing mit QGIS

pgRouting und Roadgraph Plugin

Page 2: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

Routing

Shortest Path

pgRouting shortest_path()

RoadGraph Plugin

Page 3: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

Roadgraph Plugin

Plugin-Homepage: http://gis-lab.info/qa/road-graph-eng.html

Kürzeste Route zwischen zwei Punkten über einen beliebigen Polyline-Layer

Page 4: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

Roadgraph Plugin

ReisezeitStreckenlänge

LayerFahrtrichtungen

Geschwindigkeit

Page 5: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

Roadgraph Plugin

Page 6: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

Roadgraph Plugin

+ relativ einfache Installation+ beliebige Linien-Layer+ berücksichtigt Einbahnen

- langsam- Snappingprobleme bei Start- und Endpunkten

Page 7: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

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

Page 8: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

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;

Page 9: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

pgRouting

Voraussetzungen:

Kanten-Tabelle mit Kanten-IDStart- und Endknoten-IDKosten

LängeReisezeitTreibstoffverbrauchC02...

Page 10: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

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)

Page 11: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

pgRouting

Page 12: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

pgRouting

+ schnell+ unterschiedliche Algorithmen (Heuristiken, Abbiegebeschränkungen, TSP, ...)

- Installationsaufwand (PostgreSQL, PostGIS, pgRouting)- kein GUI- Topologie notwendig- Knoten-IDs müssen vom Typ int4 sein

Page 13: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

Anwendungsmöglichkeiten

Page 14: Routing in QGIS...2011/05/06  · pgRouting CREATE OR REPLACE FUNCTION shortest_path(sql text, source_id integer, target_id integer, directed boolean, has_reverse_cost boolean) RETURNS

Kontakt

Anita [email protected]

http://underdark.wordpress.com