Turn Openstreetmap XML into Indoor Mapping Data Format (IMDF). The generated IMDF archive can be used with Apple Mapkit. Here is sample code for IOS.
Disclaimer: certainly this conversion is not straight forward but this project should be a starting point. There is still manual mapping to do.
First clone this repository
git clone https://github.com/danielrotaermel/osmtoimdf.git && cd osmtoimdf
Install dependencies
npm install
To gather the features used to generate the IMDF archive you will have to write some overpass queries.
-
Start by creating a bounding box for the queries. You can use http://geojson.io for reference see here. Use this script to quickly format the GeoJSON to use with overpass).
-
Edit the samples with overpass-turbo.eu. The queries should gather features according to the IMDF Feature Types.
-
After you created all you queries you can run the runQueries.sh script to download the OSM XMLs.
-
Edit the file in the directory ./overpass-queries/manual-data to fit your venue.
-
Edit ./osmtoimdf.js to map osm attributes to IMDF attributes.
-
run the conversion
npm run start
-
Test the generated ./IMDFData.zip over here https://register.apple.com/indoor/imdf-sandbox
If you want to add custom categories etc. do so in the ./imdf-model directory for example right here ./imdf-model/category-extended.js