AUTOMATIC EXTRACTION of IndoorGML CORE MODEL from OpenStreetMap

Navigation has become an essential component of human life and a necessary component in many fields. Because of the increasing size and complexity of buildings, a unified data model for navigation analysis and exchange of information. IndoorGML describes an appropriate data model and XML schema of indoor spatial information that focuses on modelling indoor spaces. Collecting spatial data by professional and commercial providers often need to spend high cost and time, which is the major reason that VGI emerged. One of the most popular VGI projects is OpenStreetMap (OSM). In this paper, a new approach is proposed for the automatic generation of IndoorGML data core file from OSM data file. The output of this approach is the file of core data model that can be used alongside the navigation data model for navigation application of indoor space.


INTRODUCTION
In the recent years, navigation has become an essential component of human life and a necessary component in many fields such as disaster management, traffic management, and urban planning.Because of the increasing size and complexity of buildings, navigation is not only restricted to the outdoor environment but also covers indoor environment (Kim et al., 2013).A large number of applications, which are based on routing inside public buildings such as hospitals, shopping malls, universities, and airports, have been created.This type of applications needs the same data model for navigation analysis and exchange of information to each other (Li et al., 2010).Converting spatial data to a unified format is a discussable topic in navigation.IndoorGML data model is the proposed data structure for this issue.On the other hand, indoor navigation needs comprehensive geographic data for analyses and applications.Projects such as OSM often provide the cheapest source of geospatial data that is useful for outdoor and indoor navigation.
In the past years, several research was focused on indoor navigation problems based on VGI data.Goetz discussed the automatic generation simulation-related data based on OSM (IndoorOSM) to perform multi-agent evacuation simulations (Goetz et al., 2012a).Mortari presented the automatic extraction of the connectivity graph of a building from CityGML structure for indoor navigation (2013).Herrera et al. (2014) used IndoorOSM data and hardware component of smartphone to provide a hybrid indoor localization approach.Zaragozí et al. proposed a hybrid navigation system based on open data and published via standard protocols and web services (Zaragozí et al., 2015).However, to the authors of this paper's knowledge there is currently no an approach for automated extraction IndoorGML data from OSM data.
The main purpose of this paper is development of an automatic approach for automatic generation of IndoorGML data core file from OSM data file.The rest of this paper is organized as follows.In Section 2, OSM and IndoorOSM are introduced.In Section 3, the IndoorGML standard is described in details required for the discussion.This is followed by representing methodology and its implementation in Section 4. Conclusion is final section.

OPENSTREETMAP AND INDOOROSM
Navigation requires extensive, high-quality geospatial data for applications and analysis.Collecting spatial data by professional and commercial providers often need to spend high cost and time, which is the major reason that Volunteered Geographic Information (VGI) has become more attractive to professionals in the geo-information industry in the last few years.People participation without the need to specialized knowledge, self-improvement, selfpromotion and creation dynamic, and cost effective spatial information infrastructure are benefits of the VGI (Goodchild, 2007).
One of the most popular VGI projects is OSM.The main goal of OSM is generation of a free online map that covers whole globe.There exist three levels of editors (iD, potlatch, and JOSM) that allow any user with any level of expertise to create, edit, and improve spatial data in OSM.Geometric data collected by GPS receivers or individual knowledge of people is shared in the form of node, way, and relation in OSM databases.Moreover, semantic information in the form of key-value pairs can be linked to geometric data.This project has been extended in many different directions, such as indoor mapping, 3D mapping, geocoding, and routing services.
At the end of 2011, OSM launched IndoorOSM, which is a tagging schema for indoor mapping following OSM methodologies.It provides two dimensional geometries with additional semantic or metric indoor information (Goetz et al., 2012b).IndoorOSM represents floors, rooms, corridors, doors, and POIs of indoor environments by using nodes, ways, and relations.All map data from OSM can be exported as an XML *.osm format for further processing.

IndoorGML STANDARD
CityGML, KML (Keyhole Markup Language), and IFC (Industry Foundation Classes) are several standards that focus on 3D geometry and semantic of buildings but they lack necessary components that are needed by indoor navigation applications.IndoorGML standard describes an appropriate data model and XML schema of indoor spatial information that focuses on modelling indoor spaces for navigation goals.It is implemented as an application schema of the Geography Markup Language (GML) version 3.2.1.This standard comprises of two basic components: a core data model (to describe topological connectivity and different contexts of indoor spaces) and a data model for navigation in indoor spaces (OGC, 2012).Indoor of buildings can be modeled as cellular spaces by non-overlapping cells.Each cell is defined as the smallest unit of a building such as rooms and corridors (Mortari, 2015) and has unique ID and common boundary.A cellular space S is defined as follows: where ci is the i th cell (OGC,2012).
In IndoorGML structure, it is required to describe the topological relationships expressly.The Node Relation Graph (NRG) is generally used for building data to represent topological relationships, e.g.adjacency and connectivity among buildings (Lee, 2004).Furthermore, the Poincaré duality (Munkres, 1984) is used for representing topological relationships.Figure 1 indicates the graphic representation of NRG graph in the building plan for part of the case study.
Because the geometric representation of features in indoor space is not a major focus of IndoorGML, there are three ways for representing geometry of building parts in IndoorGML data model (OGC, 2012): 1. External reference: An IndoorGML document only contains external links to objects defined in other data sets such as CityGML file.2. Geometry in IndoorGML: Geometric representation of each building part may be included within an IndoorGML document.It is GM_Surface in 2D and GM_Solid in 3D spaces as defined in ISO 19107 (ISO 19107, 2003).3.No geometry: No geometric information is also included in IndoorGML document.

METHODOLOGY AND IMPLEMENTATION
Our case study in this paper is the building for school of surveying and Geospatial Information Engineering at University of Tehran.The plan of case study building, which already exist in OSM, is shown in Fig. 4. The proposed methodology is illustrated in Figure 5.To implement this approach, firstly, the building footprint for university of Tehran with floors was entered as relation in the OSM via JOSM editor (IndoorOSM).Besides, for each building part, semantic information such as part ID, room, name, and building level was added.Locations of door and entrance were also added.Then, footprint of mentioned building was exported to *.osm format from OSM portal and was used as input data for the approach.The exported *.osm file contains a data model that consists of node, way, relation, and semantic tag data of building.There is a hierarchical relationship between members of file and each member that has a unique ID and its semantic tag.This structure was read by proposed approach; required elements of it was extracted and saved in the suitable data model.NRG is used for storing topology of building in IndoorGML.Our approach calculated the centroid (Eq.2 and Eq.3) of each building part and coordinates of each door, saved them as nodes of duality structure and then created the NRG graph from these nodes. (2) −1 =0 (3) where A is the area of polygon, N is the number of polygons point, xi and yi are coordinates of i th vertex od polygon, and Cx and Cy are coordinates of centroid of polygon.The output of our approach is a core data model file of IndoorGML.This approach is written in Java language and can convert OSM data file automatically to XML structure of IndoorGML data core model.

Figure 3 .
Figure 3. Footprint of case study building in JOSM

Figure 4
indicates parts of the output file, which shows one State.

Figure 5
Figure 5 Part of output file