Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.
PGROUTING IN QGIS
How to tame your network - Ross McDonald @mixedbredie
Here be dragons
Get
Merge
Load
Update
Populate
Build
Analyse
Get lost
http://ghost.mixedbredie.net/pgrouting-with-strategi/
Get the data
Open Data Download
http://bit.ly/1I0Fwz3
Merge the roads
There’s a QGIS tool for
that!
Select: Motorways, A
roads, B roads, primary
routes, minor roads and
local s...
Load into PostGIS
QGIS DB
Manager
Schema
Table
Primary key
Geometry
SRID
Spatial index
Update the network table
Add the required columns for pgRouting
Build the indices to make it fast
ALTER TABLE os_strategi....
Populate the network table
Start and end coordinates
Length costs
Speed (average driving / walking speeds)
Time = length /...
Build the network topology
Creates a node table used for start and end
points
SELECT pgr_createtopology(
'os_strategi.stra...
Analyse the network
Checks for errors
MULTILINESTRING v LINESTRING
SELECT pgr_analyzegraph(
'os_strategi.strat_rds', 0.001...
Get Lost
© Crown copyright and database right 2015 100023404
Djikstra Shortest Path
© Crown copyright and database right 2015 100023404
Strategi Network
Driving Distance (10min)
© Crown copyright and database right 2015 100023404
Strategi Network
Alpha Shapes (isochrones)
© Crown copyright and database right 2015 100023404
Strategi Network
Astar heuristic shortest path
Meridian2 Network
© Crown copyright and database right 2015 100023404
Turn Restricted Shortest Path
Integrated Transport Network with RRI
© Crown copyright and database right 2015 100023404
Geoserver WMS + TRSP
http://ghost.mixedbredie.net/combining-pgrouting-functions-in-openlayers3/
ITN+RRI=TRSP
'select to_cost, teid as
target_id,
feid||coalesce('',''||via,'''') as
via_path from
itn_turn_restrictions‘
D...
Guides
http://anitagraser.com/?s=pgrouting
http://ghost.mixedbredie.net/pgrouting-with-
strategi/
http://ghost.mixedbredie...
Nächste SlideShare
Wird geladen in …5
×

Ross McDonald - PgRouting in QGIS

0 Aufrufe

Veröffentlicht am

An introduction to using pgRouting with Ordnance Survey Open Data in QGIS with the pgRouting Layer plugin. Presentation given at the 3rd QGIS UK user group meeting in Edinburgh on 5th May 2015.

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

Ross McDonald - PgRouting in QGIS

  1. 1. PGROUTING IN QGIS How to tame your network - Ross McDonald @mixedbredie
  2. 2. Here be dragons Get Merge Load Update Populate Build Analyse Get lost http://ghost.mixedbredie.net/pgrouting-with-strategi/
  3. 3. Get the data Open Data Download http://bit.ly/1I0Fwz3
  4. 4. Merge the roads There’s a QGIS tool for that! Select: Motorways, A roads, B roads, primary routes, minor roads and local streets Vector > Data Management Tools > Merge Shapefiles to One…
  5. 5. Load into PostGIS QGIS DB Manager Schema Table Primary key Geometry SRID Spatial index
  6. 6. Update the network table Add the required columns for pgRouting Build the indices to make it fast ALTER TABLE os_strategi.strat_rds ADD COLUMN source integer, ADD COLUMN target integer, etc., etc. CREATE INDEX strat_rds_source_idx ON os_strategi.strat_rds USING btree(source);
  7. 7. Populate the network table Start and end coordinates Length costs Speed (average driving / walking speeds) Time = length / speed Reverse costs
  8. 8. Build the network topology Creates a node table used for start and end points SELECT pgr_createtopology( 'os_strategi.strat_rds', 0.001, 'geometry', 'gid', 'source', 'target');
  9. 9. Analyse the network Checks for errors MULTILINESTRING v LINESTRING SELECT pgr_analyzegraph( 'os_strategi.strat_rds', 0.001, 'geometry', 'gid', 'source', 'target');
  10. 10. Get Lost © Crown copyright and database right 2015 100023404
  11. 11. Djikstra Shortest Path © Crown copyright and database right 2015 100023404 Strategi Network
  12. 12. Driving Distance (10min) © Crown copyright and database right 2015 100023404 Strategi Network
  13. 13. Alpha Shapes (isochrones) © Crown copyright and database right 2015 100023404 Strategi Network
  14. 14. Astar heuristic shortest path Meridian2 Network © Crown copyright and database right 2015 100023404
  15. 15. Turn Restricted Shortest Path Integrated Transport Network with RRI © Crown copyright and database right 2015 100023404
  16. 16. Geoserver WMS + TRSP http://ghost.mixedbredie.net/combining-pgrouting-functions-in-openlayers3/
  17. 17. ITN+RRI=TRSP 'select to_cost, teid as target_id, feid||coalesce('',''||via,'''') as via_path from itn_turn_restrictions‘ Directed = true Has reverse = true
  18. 18. Guides http://anitagraser.com/?s=pgrouting http://ghost.mixedbredie.net/pgrouting-with- strategi/ http://ghost.mixedbredie.net/using- pgrouting-with-os-meridian2/ http://ghost.mixedbredie.net/building-itn-for- pgrouting/

×