GSoC 2017 - 3D OSM Plugin API for ESA-NASA Web World Wind

Introduction
The goal of this project is to create a plugin API to display OpenStreetMap (OSM) data on NASA Web World Wind virtual globe in three dimensions. The OSM data is going to be fetched in real time based on a bounding box or a URL for OSM data and some keywords. The adapter will offer a function to extrude the polygons present in the fetched data using an arbitrary height value. Additionally the project may extract the real heights of buildings using DSM data and apply these heights to extrusion, improve performance via various caching techniques, and tile the data. In case the tiling will be implemented, a new adapter may be created to tile any GeoJSON data. (https://summerofcode.withgoogle.com/projects/#4767034027016192) The project can be found at https://github.com/kilsedar/3dosm.

Tentative Schedule
ɤ In case time remains, existing tiling procedures will be investigated and the most suitable one will be implemented.

Week 1

 * 1) What did I complete this week? - Configured the environment for unit testing. - Implemented OSMLayer and OSMBuildingLayer classes, which fetch the OSM data given a bounding box, render the data in 3D, zoom on the data.
 * 2) What am I going to achieve next week? - I will do research on how tiling can be implemented for OSM data in NASA Web World Wind and start its implementation.
 * 3) Is there any blocking issue? - There is no blocking issue.

Week 2

 * 1) What did I complete this week? - Fixed some bugs of the OSMBuildingLayer. - To improve the performance, instead of tiling my mentor suggested me to use triangle meshes. I started to triangulate the 3D polygons, by creating a subclass of GeoJSONParser. I first triangulated the lateral surfaces and started to read how to make polygon triangulation including the concave ones and the ones with holes. Found https://github.com/mapbox/earcut.
 * 2) What am I going to achieve next week? - If my mentor approves I will triangulate also the top of the polygons using the ear cut algorithm. - I will assess the performance improvements gained using triangulation. - I will improve the documentation.
 * 3) Is there any blocking issue? - There is no blocking issue.

Week 3

 * 1) What did I complete this week? - Managed to triangulate the top surfaces of polygons. - Made performance tests to evaluate the effect of rendering. Found out that it is always better to use triangulation instead of extrusion. - Added documentation.
 * 2) What am I going to achieve next week? - There are currently two problems, first in the triangulation, second in the type of OSM data I am getting, I will solve those. - I will check JSDoc to see how the documentation works, and improve the documentation. - I will assess the feasibility of getting the real heights of the OSM buildings using DSM, and search for possible ways to achieve that.
 * 3) Is there any blocking issue? - There is no blocking issue.

Week 4

 * 1) What did I complete this week? - Added triangulation also for MultiPolygons and changed the Overpass query to exclude Points and LineStrings (solved the bugs of the past week). - Learned the syntax of JSDoc and added documentation. - Started to learn about the ways to extract NDSM (Normalized Digital Surface Model) from the ASC files that I have for the first & last returns, and started to think about a possible workflow to match this data with GeoJSON OSM data.
 * 2) What am I going to achieve next week? - I will go on the with the documentation. - I will work on the NDSM and GeoJSON matching in JavaScript.
 * 3) Is there any blocking issue? - There is no blocking issue.

Week 5

 * 1) What did I complete this week? - I came to understand that it is not difficult to extract building heights from the DSM and DTM data I have, but this process cannot be integrated with the Web World Wind (WWW) API. I talked with my supervisor at the university and I decided to do that outside GSoC with GRASS and only display the results using WWW API (I will update the OSM GeoJSON for Milan with the height information and display this static data for showcasing). - Completed the documentation for the current state of the project. - Added code to apply building heights if the information exists in OSM. I also added coloring based on the building heights (heatmap).
 * 2) What am I going to achieve next week? - At this point in the project I don't know the next steps.
 * 3) Is there any blocking issue? - There is no blocking issue.

Student's Biography
Candan Eylül Kilsedar studied Computer Science and Engineering in BSc and MSc. Currently she is working in the Department of Civil and Environmental Engineering, in GEOlab, Politecnico di Milano, Italy as a research fellow and PhD student. GEOlab focuses highly on Free and Open Source Software (FOSS) and as a result she has experience in using FOSS. She wants to take the opportunity of joining GSoC 2017 to extend her knowledge in FOSS development. Her mentors for this project are Patrick Hogan, the project manager of the NASA World Wind and Jakub Balhar, software Engineer at Gisat. Eventually she wants to develop & use FOSS to build better communication and collaboration inside and among cities. She is interested in web technologies and geographic data visualization techniques. Her GitHub repositories can be found at https://github.com/kilsedar.