This is a demo solution for the OSS4SDG - Sustainable Smart Cities, Challenge # 2 – Development of apps based on OSM data (https://ideas.unite.un.org/sdg11/Page/Challenge2)
Thanks to source code from SnakeSneakS (https://github.com/SnakeSneakS/OpenStreetMap-Unity). The Youtube tutorialSloan Kelly 'GTA in Unity!? Use Real World Maps!' also helps a lot (https://www.youtube.com/watch?v=780Ia5e8LHQ).
The general idea is we hope to navigate in AR environment based on OSM 3D data. Step by step, we plan to
- Collect the height infomation of buildings and upload them into OSM. (Ongoing)
- Download the OSM data and create a 3D model in unity. (Fork and Developing)
- Developing the AR app in Microsoft HoloLens 2 with Mixed Reality Toolkit. (Demo pending)
- Connecting the live coordinate data in mobile phone with the HoloLens, through the app gps2ip based on bluetooth. (Completed: https://github.com/Leonival/OSM-in-live-AR/blob/9bba4966349b213043181cc53750bad4b8f7e04b/BLETest.cs)
- Georeferencing the coordinate from the real world to unity. (Ongoing)
- Creating the navigated interaction in HoloLens. (Pending)
Open data includes
- Building Height 2012 from Copernicus Land Monitoring Service (https://land.copernicus.eu/local/urban-atlas/building-height-2012)
- Ordnance Survey MasterMap Building Height Attribute (https://www.ordnancesurvey.co.uk/business-government/products/mastermap-building).
Both of them are raster data.
My colleague also collects building height data from SAR data. Paper name:
- Large-scale building height retrieval from single SAR imagery based on bounding box regression networks (https://www.sciencedirect.com/science/article/pii/S0924271621003221)
- CG-Net: Conditional GIS-Aware Network for Individual Building Segmentation in VHR SAR Images (https://ieeexplore.ieee.org/abstract/document/9321533)
PS. The building height is not validated currently. Thus we haven't updated the data to OSM.
-
Download map data (.osm file) from JOSM, an extensible editor for OpenStreetMap (https://josm.openstreetmap.de/). Download the data from website is not recommended, it might cause some error when rendering in unity.
-
Put the .osm file in Assets/OSM/Data/
-
In SampleScene, Find the component atacched to gameobject "OSMmap", change its OSMfileName value. If you named your .osm file as "name.osm", you shoude enter "name.osm".
-
Open the scene document. Click the plan button to render the view.
-
Build the app with the Mixed Reality Toolkit.
-
Adjust and correct the position data in OSM, Mobile phone, and unity into the same coordinate system.
Main campus, Technical University of Munich.
- © OpenStreetMap contributors
- Base map and data from OpenStreetMap and OpenStreetMap Foundation
- Open Data Commons Open Database License
- Creative Commons Attribution-ShareAlike 2.0