LightOSM.jl

LightOSM.jl is Julia package for downloading and analysing geospatial data from OpenStreetMap APIs (Nominatim and Overpass), such as nodes, ways, relations and building polygons.

Interface

Acknowledgements

LightOSM.jl is inspired by the Python package OSMnx for its interface and Overpass query logic. Graph analysis algorithms (connected components and shortest path) are based on LightGraphs.jl implementation, but adapted to account for turn restrictions and improve runtime performance.

Another honourable mention goes to an existing Julia package OpenStreetMapX.jl as many learnings were taken to improve parsing of raw OpenStreetMap data.

Key Features

  • Search, download and save OpenSteetMap data in .osm, .xml or .json, using a place name, centroid point or bounding box
  • Parse OpenStreetMap transport network data such as motorway, cycleway or walkway
  • Parse OpenStreetMap buildings data into a format consistent with the GeoJSON standard, allowing for visualisation with libraries such as deck.gl
  • Calculate shortest path between two nodes using the Dijkstra or A* algorithm (based on LightGraphs.jl, but adapted for better performance and use cases such as turn resrictions)
  • Find nearest nodes from a query point using a K-D Tree data structure (implemented using NearestNeighbors.jl)

Usage

A comprehensive tutorial can be found found here.

Using OSMGraphs in Unit Tests

Benchmarks

Benchmark comparison for shortest path algorithms can be found here.