Package: wayfarer
Wayfarer is Python library for creating and analysing geospatial networks usingNetworkX.See theOnline Demoto see examples of use cases for the library.See theWayfarer Presentationfor an overview presentation.FunctionalityIts focus is on creating user interfaces for selecting and creating linear features such as roads and rivers in a network.
Uses shortest routes to provide a user interface quickly mark up linear features.RoutingDynamic splitting - accessibility scenarios. Changes to isochrones.Linear ReferencingLinear referencing is a powerful technique used in Geographic Information Systems (GIS) to locate geographic features and events along a
linear feature such as a road, river or pipeline.Easy analysis and reporting of data along linear featuresEfficient data storage - no need to duplicate linear featuresWhy Use Wayfarer?Works with any data source (any database, flat files, Python dictionaries)Compatibility withosmnxAccess to all of the NetworkXAlgorithmsAllow an easy user interface for marking up features on linear referenced features.Comparison with AlternativespgRouting- requires users to have a good understanding of SQL, PostGIS, and network analysis concepts.
This can make it difficult for beginners to get started. PgRouting is designed to work with PostgreSQL and PostGIS,
so users may need to convert their data to these formats before they can use the tool.
This can be time-consuming and may require additional software or expertise. More familiar with Python than Postgres and SQLNetwork Analyst is an extension for ArcGISGraphHopperOSRMOSMNX is a Python library for working with OpenStreetMap data and generating street networks. It includes tools for routing and network analysis, including shortest-path algorithms and tools for calculating network measures such as centrality and betweenness. OSMnx can be used to generate routing networks for a range of use cases, including transportation planning and urban design.Pandanais a Python library for working with large-scale spatial networks, including road networks
and public transit networks. It includes tools for network analysis and routing, as well as tools for generating spatial aggregates and
conducting spatial queries. Pandana is designed to be fast and memory-efficient, making it well-suited for large-scale routing applicationsPyRoutelibis a Python library for network routing that is built on top of NetworkX.
It includes a range of routing algorithms, including Dijkstra’s algorithm and A* search, as well as tools for working with routing
profiles and generating directions. PyRoutelib is designed to be easy to use and can be integrated into other Python projects.Demo ApplicationsThe demo applications use a Python back-end with wayfarer, and a JavaScript front-end build onOpenLayers.
The front-end code is stored in a separate repository athttps://github.com/compassinformatics/wayfarer-demo/To setup the code below you can run the following commands in a PowerShell terminal and using Windows.
Alternatively you can use theDockerfile.# create a virtual environment and activate itvirtualenvC:\VirtualEnvs\wayfarerC:\VirtualEnvs\wayfarer\Scripts\activate.ps1# check-out the latest version of the wayfarer project which include# the demo Python services and datagitclonehttps://github.com/compassinformatics/wayfarer# install wayfarer and its requirements to a virtual environmentcdC:\Temp\wayfarerpipinstallwayfarerpipinstall-rrequirements.demo.txt# copy the data to the demo folderCopy-Item-Pathdemo-DestinationC:\VirtualEnvs\wayfarer-RecurseCopy-Item-Pathdata-DestinationC:\VirtualEnvs\wayfarer-Recurse# run the demo services as a Python web servicecdC:\VirtualEnvs\wayfarer\demouvicornmain:app--workers4--port8001# should now be available at http://localhost:8001