A set of tools for converting Open Street Map data into 3d geometry, also incorporating S2 Cells.
Install and use Conan
conan profile detect --force
create a conan profile with debug setting. then build
conan install . --output-folder=build --build=missing -pr=debug
In root directory create a build folder
mkdir build
cd into into it and build with cmake
cmake .. -DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" -DCMAKE_BUILD_TYPE=debug
On systems that dont have c++ filesystem (MacOS), you need to avoid one of the tools:
cmake -DBUILD_OSMSPLIT=OFF ..
Starting with an osm data file, download an area from https://www.openstreetmap.org/, eg old_street.osm
split the osm file into files comprising of S2 cells by specifying to input file, an output folder and an S2 cell level:
osms2split -i old_street.osm -o testadata -l 14
the output folder will now contain a number of osm files for each S2 cell.
convert osm data files into geometry
osm2assimp -i example.osm -o example.obj
Tests make use of https://github.com/bats-core/bats-core, a system for running tests in bash. After building to the 'build' folder export PATH:
export PATH=$PATH:`pwd`/build:`pwd`/build/ext/assimp/bin/
Run tests with:
bats test.bats