SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
Using Ordnance Survey
datasets with pgRouting
Ross McDonald
Angus Council
@mixedbredie
“The person
attempting to travel
two roads at once will
get nowhere.”
- Xun Zi
Contains OS Open Data Crown Copyright and Database Right 2016.
What is it?
An extension to the PostGIS enabled
PostgreSQL database to add geospatial
routing functionality.
Why use it?
• Free (as in freedom)
• Flexible (as in open source)
• Functional (as in fully featured)
• Fun (if you’re that way inclined)
http://www.cartographicperspectives.org/index.php/journal/rt/printerFriendly/c
What does it need?
CC-BY-NC-SAReproducedwiththepermissionoftheNationalLibraryofScotland
Where can one get such things?
Data, data everywhere
• OS Open Roads
• OS Meridian2
• OS Strategi
• OS ITN
• OS Highways
• OS Water Network
OpenStreetMap
Metro extracts by Mapzen
"name1" IN ('Watling
Street','Fosse Way',
'Ackling Dyke', 'Akeman
Street', 'Cade''s Road',
'Dere Street', 'Ermin
Way', 'Devil''s
Causeway', 'Devil''s
Highway', 'Ermine
Street', 'Fen Causeway',
'Icknield Street', 'King
Street', 'Maiden Way',
'Military Way', 'Peddars
Way‘, …)
https://dhs.stanford.edu
/spatial-
humanities/geographic-
networks-pgrouting/
/en.wikipedia.org/wiki/Roman_roads_in_Britain#/media/File:Roman_Roads_in_Britannia.svg
But first you gotta be loaded
• For OS data
– Astun Loader!
– Lutra’s OS Translator II
– Ogr2ogr
– Snowflake’s GoLoader*
– Safe’s FME*
• For OpenStreetMap
– osm2pgrouting
There’s a plugin for that
• How can I use it
without writing
SQL?
• pgRouting Layer by
Anita Graser and
others in the
pgRouting team
CC-BY-NC-SAReproducedwiththepermissionoftheNationalLibraryofScotland
“Most roads lead men
homewards, my road leads
forth.”
John Masefield
PostgreSQL function to loop through each input
point and calculate Djikstra shortest path to every
node on the network…
pgRouting 1.0.7-dev
pgRouting 2.2.3
• Using pgr_drivingdistance and
pgr_alphashape
• Using an all-in-one function to process
multiple input points
IMPROVED
Performance Enhancements
• Index your data
• Add a Bounding Box to
your query
• Make it easier for the
user
Vanilla Shortest Path
SELECT seq, id1 AS node, id2 AS
edge, cost FROM pgr_dijkstra('
SELECT gid AS id, source::integer,
target::integer, cost_time::double
precision AS cost,
rcost_time::double precision AS
reverse_cost FROM or_network',
100828, 1136587, false, true);
M&S Shortest Path
SELECT seq, id1 AS node, id2 AS edge,
cost FROM pgr_dijkstra(' SELECT gid AS
id, source::integer, target::integer,
cost_time::double precision AS cost,
rcost_time::double precision AS
reverse_cost FROM or_network
WHERE geometry && ST_Expand( (SELECT
ST_Collect(the_geom) FROM
or_network_vertices_pgr WHERE id IN
(100828, 1136587)),5000)', 100828,
1136587, false, true);
Making things even better!
• Update the QGIS plugin to use new PGR
functions
• Update the plugin to use a bounding box
• Add restrictions (e.g. closures, safe
routes)
• How does psycopg2 work? Is it a
bottleneck?
Not Mrs Beeton’s recipes
http://anitagraser.com
https://georepublic.info/en/blog
http://workshop.pgrouting.org/index.html
http://ghost.mixedbredie.net/tag/pgrouting
CC-BY-NC-SAReproducedwiththepermissionoftheNationalLibraryofScotland
Thank you
Ross McDonald
Angus Council
mcdonaldr@angus.gov.uk
@mixedbredie
01307476419

Weitere ähnliche Inhalte

Was ist angesagt?

Thematic mapping at AGU 2008
Thematic mapping at AGU 2008Thematic mapping at AGU 2008
Thematic mapping at AGU 2008
Bjorn Sandvik
 
GRASS and OSGeo: a framework for archeology
GRASS and OSGeo: a framework for archeologyGRASS and OSGeo: a framework for archeology
GRASS and OSGeo: a framework for archeology
Markus Neteler
 

Was ist angesagt? (20)

Ggmap Packages in R
Ggmap Packages in RGgmap Packages in R
Ggmap Packages in R
 
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGISGeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
GeoTuple a Framework for Web Based Geo-Analytics with R and PostGIS
 
Bus Karo: Powering Transit Information with Open Data
Bus Karo: Powering Transit Information with Open DataBus Karo: Powering Transit Information with Open Data
Bus Karo: Powering Transit Information with Open Data
 
OpenHistoricMap: overview
OpenHistoricMap: overviewOpenHistoricMap: overview
OpenHistoricMap: overview
 
MapMyCab
MapMyCabMapMyCab
MapMyCab
 
Thematic mapping at AGU 2008
Thematic mapping at AGU 2008Thematic mapping at AGU 2008
Thematic mapping at AGU 2008
 
Analysing OpenStreetMap Data with QGIS
Analysing OpenStreetMap Data with QGISAnalysing OpenStreetMap Data with QGIS
Analysing OpenStreetMap Data with QGIS
 
GeoTrellis, GIS on Scala
GeoTrellis, GIS on ScalaGeoTrellis, GIS on Scala
GeoTrellis, GIS on Scala
 
Fed Geo Day - GeoTrellis Intro
Fed Geo Day - GeoTrellis IntroFed Geo Day - GeoTrellis Intro
Fed Geo Day - GeoTrellis Intro
 
Chris hill rps_postgis_threeoutoffouraintbad_20150505_1
Chris hill rps_postgis_threeoutoffouraintbad_20150505_1Chris hill rps_postgis_threeoutoffouraintbad_20150505_1
Chris hill rps_postgis_threeoutoffouraintbad_20150505_1
 
OpenLayer's basics
OpenLayer's basicsOpenLayer's basics
OpenLayer's basics
 
EuroPython 2019: GeoSpatial Analysis using Python and JupyterHub
EuroPython 2019: GeoSpatial Analysis using Python and JupyterHubEuroPython 2019: GeoSpatial Analysis using Python and JupyterHub
EuroPython 2019: GeoSpatial Analysis using Python and JupyterHub
 
MapMyCab Presentation
MapMyCab PresentationMapMyCab Presentation
MapMyCab Presentation
 
EPOS TCS Geological Information and Modeling presentation-EGU-2019_with-demo
EPOS TCS Geological Information and Modeling presentation-EGU-2019_with-demoEPOS TCS Geological Information and Modeling presentation-EGU-2019_with-demo
EPOS TCS Geological Information and Modeling presentation-EGU-2019_with-demo
 
Pa wi parallelweighted itemset mining by means of mapreduce
Pa wi parallelweighted itemset mining by means of mapreducePa wi parallelweighted itemset mining by means of mapreduce
Pa wi parallelweighted itemset mining by means of mapreduce
 
A vision to make OSM data the backbone of history across time and space - Int...
A vision to make OSM data the backbone of history across time and space - Int...A vision to make OSM data the backbone of history across time and space - Int...
A vision to make OSM data the backbone of history across time and space - Int...
 
Making data storage more efficient
Making data storage more efficientMaking data storage more efficient
Making data storage more efficient
 
GRASS and OSGeo: a framework for archeology
GRASS and OSGeo: a framework for archeologyGRASS and OSGeo: a framework for archeology
GRASS and OSGeo: a framework for archeology
 
ESTA-LD exploring spatio-temporal linked statistical data
ESTA-LD exploring spatio-temporal linked statistical dataESTA-LD exploring spatio-temporal linked statistical data
ESTA-LD exploring spatio-temporal linked statistical data
 
Sdwwg experiences and outlook
Sdwwg experiences and outlookSdwwg experiences and outlook
Sdwwg experiences and outlook
 

Ähnlich wie Pgrouting_foss4guk_ross_mcdonald

Social Data and Log Analysis Using MongoDB
Social Data and Log Analysis Using MongoDBSocial Data and Log Analysis Using MongoDB
Social Data and Log Analysis Using MongoDB
Takahiro Inoue
 
mini project_shortest path visualizer.pptx
mini project_shortest path visualizer.pptxmini project_shortest path visualizer.pptx
mini project_shortest path visualizer.pptx
tusharpawar803067
 

Ähnlich wie Pgrouting_foss4guk_ross_mcdonald (20)

DataStax and Esri: Geotemporal IoT Search and Analytics
DataStax and Esri: Geotemporal IoT Search and AnalyticsDataStax and Esri: Geotemporal IoT Search and Analytics
DataStax and Esri: Geotemporal IoT Search and Analytics
 
Day 6 - PostGIS
Day 6 - PostGISDay 6 - PostGIS
Day 6 - PostGIS
 
Social Data and Log Analysis Using MongoDB
Social Data and Log Analysis Using MongoDBSocial Data and Log Analysis Using MongoDB
Social Data and Log Analysis Using MongoDB
 
mini project_shortest path visualizer.pptx
mini project_shortest path visualizer.pptxmini project_shortest path visualizer.pptx
mini project_shortest path visualizer.pptx
 
Gis capabilities on Big Data Systems
Gis capabilities on Big Data SystemsGis capabilities on Big Data Systems
Gis capabilities on Big Data Systems
 
Follow the money with graphs
Follow the money with graphsFollow the money with graphs
Follow the money with graphs
 
PostgreSQL is the new NoSQL - at Devoxx 2018
PostgreSQL is the new NoSQL  - at Devoxx 2018PostgreSQL is the new NoSQL  - at Devoxx 2018
PostgreSQL is the new NoSQL - at Devoxx 2018
 
Big Spatial(!) Data Processing mit GeoMesa. AGIT 2019, Salzburg, Austria.
Big Spatial(!) Data Processing mit GeoMesa. AGIT 2019, Salzburg, Austria.Big Spatial(!) Data Processing mit GeoMesa. AGIT 2019, Salzburg, Austria.
Big Spatial(!) Data Processing mit GeoMesa. AGIT 2019, Salzburg, Austria.
 
Pycon2011
Pycon2011Pycon2011
Pycon2011
 
Presentation
PresentationPresentation
Presentation
 
Post gispguk
Post gispgukPost gispguk
Post gispguk
 
Open Source Databases And Gis
Open Source Databases And GisOpen Source Databases And Gis
Open Source Databases And Gis
 
Stratio's Cassandra Lucene index: Geospatial use cases by Andrés Peña
Stratio's Cassandra Lucene index: Geospatial use cases by Andrés PeñaStratio's Cassandra Lucene index: Geospatial use cases by Andrés Peña
Stratio's Cassandra Lucene index: Geospatial use cases by Andrés Peña
 
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...
PINOGIO : A simple way to create a web infographic map (피노지오 : 웹 인포그래픽 맵을 만드는...
 
ArcGIS and Multi-D: Tools & Roadmap
ArcGIS and Multi-D: Tools & RoadmapArcGIS and Multi-D: Tools & Roadmap
ArcGIS and Multi-D: Tools & Roadmap
 
Clickstream data with spark
Clickstream data with sparkClickstream data with spark
Clickstream data with spark
 
OpenStreetMap in 3D - current developments
OpenStreetMap in 3D - current developmentsOpenStreetMap in 3D - current developments
OpenStreetMap in 3D - current developments
 
Intro to Spatial data
Intro to Spatial data Intro to Spatial data
Intro to Spatial data
 
Automobile Route Matching with Dynamic Time Warping Using PySpark with Cather...
Automobile Route Matching with Dynamic Time Warping Using PySpark with Cather...Automobile Route Matching with Dynamic Time Warping Using PySpark with Cather...
Automobile Route Matching with Dynamic Time Warping Using PySpark with Cather...
 
Big Data Day LA 2015 - Big Data Day LA 2015 - Applying GeoSpatial Analytics u...
Big Data Day LA 2015 - Big Data Day LA 2015 - Applying GeoSpatial Analytics u...Big Data Day LA 2015 - Big Data Day LA 2015 - Applying GeoSpatial Analytics u...
Big Data Day LA 2015 - Big Data Day LA 2015 - Applying GeoSpatial Analytics u...
 

Mehr von Ross McDonald

Mehr von Ross McDonald (20)

Visualising school catchment areas - FOSS4GUK 2018
Visualising school catchment areas - FOSS4GUK 2018Visualising school catchment areas - FOSS4GUK 2018
Visualising school catchment areas - FOSS4GUK 2018
 
Using QGIS to create 3D indoor maps
Using QGIS to create 3D indoor mapsUsing QGIS to create 3D indoor maps
Using QGIS to create 3D indoor maps
 
Viewsheds and Advanced Calculations
Viewsheds and Advanced CalculationsViewsheds and Advanced Calculations
Viewsheds and Advanced Calculations
 
Using QGIS for ecological surveying
Using QGIS for ecological surveyingUsing QGIS for ecological surveying
Using QGIS for ecological surveying
 
Welcome to the 6th Scottish QGIS UK meeting
Welcome to the 6th Scottish QGIS UK meetingWelcome to the 6th Scottish QGIS UK meeting
Welcome to the 6th Scottish QGIS UK meeting
 
How deep is your loch?
How deep is your loch?How deep is your loch?
How deep is your loch?
 
Data capture with Leaflet and OpenStreetMap
Data capture with Leaflet and OpenStreetMapData capture with Leaflet and OpenStreetMap
Data capture with Leaflet and OpenStreetMap
 
Them thar hills: shadin', texturin', blendin'
Them thar hills: shadin', texturin', blendin'Them thar hills: shadin', texturin', blendin'
Them thar hills: shadin', texturin', blendin'
 
QGIS plugin for parallel processing in terrain analysis
QGIS plugin for parallel processing in terrain analysisQGIS plugin for parallel processing in terrain analysis
QGIS plugin for parallel processing in terrain analysis
 
Mapping narrative: QGIS in the humanities classrom
Mapping narrative: QGIS in the humanities classromMapping narrative: QGIS in the humanities classrom
Mapping narrative: QGIS in the humanities classrom
 
QGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the uglyQGIS server: the good, the not-so-good and the ugly
QGIS server: the good, the not-so-good and the ugly
 
QGIS UK Thank you for coming
QGIS UK Thank you for comingQGIS UK Thank you for coming
QGIS UK Thank you for coming
 
Decision support tools for forestry using open source software
Decision support tools for forestry using open source softwareDecision support tools for forestry using open source software
Decision support tools for forestry using open source software
 
Installing QGIS on a network
Installing QGIS on a networkInstalling QGIS on a network
Installing QGIS on a network
 
Liam Mason QGIS Geoserver SLD
Liam Mason QGIS Geoserver SLDLiam Mason QGIS Geoserver SLD
Liam Mason QGIS Geoserver SLD
 
Phil Bartie QGIS PLPython
Phil Bartie QGIS PLPythonPhil Bartie QGIS PLPython
Phil Bartie QGIS PLPython
 
John Stevenson Volcanoes and FOSS4G Edinburgh
John Stevenson Volcanoes and FOSS4G EdinburghJohn Stevenson Volcanoes and FOSS4G Edinburgh
John Stevenson Volcanoes and FOSS4G Edinburgh
 
Roger Garbett - QGIS Print Composer
Roger Garbett - QGIS Print ComposerRoger Garbett - QGIS Print Composer
Roger Garbett - QGIS Print Composer
 
Matt Walsh thinkWhere_QGIS_usergroup_pyqt
Matt Walsh thinkWhere_QGIS_usergroup_pyqtMatt Walsh thinkWhere_QGIS_usergroup_pyqt
Matt Walsh thinkWhere_QGIS_usergroup_pyqt
 
Ross mc donald_qgis_ug_intro
Ross mc donald_qgis_ug_introRoss mc donald_qgis_ug_intro
Ross mc donald_qgis_ug_intro
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Pgrouting_foss4guk_ross_mcdonald