Skip to content

Builds a Bigraph modelling the hierarchy of administrative boundaries, streets and buildings using OpenStreetMap data

License

Notifications You must be signed in to change notification settings

royangkr/bigraph-of-the-world

Repository files navigation

Bigraph of the world

This tool builds a Bigraph modelling the hierarchy of administrative boundaries, streets and buildings using OpenStreetMap data.

Building

The tool can be built using dune and opam. Tested on Ubuntu 24.04.1.

  1. Clone this repository and enter the project directory.
git clone https://github.com/royangkr/bigraph_of_the_world.git
cd bigraph_of_the_world/
  1. Install opam
apt update
apt install opam
opam init
  1. Create an opam switch while in the project directory. This also installs the project's required dependencies.
opam switch create .
  1. Build the project using dune.
eval $(opam env)
dune build

The binary can then be found at _build/default/bin/botw.exe.

Running

To run the project, use:

./botw.exe <BOUNDARY_ADMIN_LEVEL> <BOUNDARY_RELATION_ID> <BOUNDARY_NAME>

For example:

./botw.exe 8 1481934 Dover

This will build a Bigraph with Dover as its root and export the Bigraph to output/8-1481934-Dover.json. This Bigraph will contain the hierarchy of administrative boundaries, streets and buildings contained in Dover.

The tool works for any relation on OSM with "admin_level", "id", and "name" tags. When running the tool on a new administrative boundary, querying Overpass API for osm files will take a while due to rate limiting.

To export the Bigraph to a dot file:

./botw.exe 8 1481934 Dover -write-dot

About

Builds a Bigraph modelling the hierarchy of administrative boundaries, streets and buildings using OpenStreetMap data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •