ANALYSIS AND REAL-TIME VISUALIZATION OF GEO-SPATIAL DATA USING XDASH : APPLICATION TO FLAIR PROJECT

The reduction of atmospheric greenhouse gas emissions is a major challenge. In this context, each natural or industrial release such as methane (CH4), carbon dioxide (CO2) has to be monitored, localized and quantified. IFP Energies nouvelles (IFPEN) is developing a mobile measurement system called Flair car whose purpose is the detection of different abnormal gas emissions. Flair car system incorporates various gas sensors, including a weather station and GPS (Global Positioning System) module, mounted on a plugin hybrid electric vehicle. This enables the real-time monitoring and the recording of geo-time-stamped gas concentration measurements. Flair map corresponds to the on board real-time visualization software. Flair map development required two important challenges : a quick and agile software modification capability together with a realtime display of measurements on maps. In order to meet these two challenges, we adopted a software rapid-prototyping approach based on the xDash tool. In this paper, our proposed real-time data visualisation approach is first introduced. Then, the rapidprototyping development methodology which resulted in the Flair map software is described. Finally, two main operational usages of Flair map are illustrated. The first involves real-time visualization aboard the car of the maps representing data acquisition from gas concentration sensors. The second shows the a-posteriori analysis of measurement campaigns for the purpose of methane anomalies study. * Corresponding author


INTRODUCTION
In the context of global warming and for geological gas storages, IFPEN develops several monitoring devices allowing the detection of anomalous gas. In this context, the main challenges are the ability to detect very small variations in gas concentrations and locate their leaks accurately in the field. The Flair car equipment corresponds to the mobile monitoring version. Flair car system is a plugin hybrid electric vehicle (PHEV) that incorporates various gas sensors, such as UV spectroscopy (Elements'atmo) and IR laser spectrometry (Picarro G2210-i). A weather station (AIRMAR) records GPS positions, temperature, barometric pressure and wind direction (corrected from car motion). To exploit all this equipment, a real-time visualization software, called Flair map, was needed. Two software challenges had to be handled : a quick and agile software modification capability together with a real-time display of measurements on maps.
Handling real-time aspects with GIS (Geographic Information Systems) have been investigated in (Xu et al., 2013) in application for indoor fire detection, in (Jeon et al., 2019) for marine surveillance, and in (Oliveira et al., 2018) for dronebased geo-referencing, but for different visualization goals, with different software methodologies and tools than those used in our work.
One technical problematic in our application was that major data acquisition and control software tools, especially those used in our context, do not include real-time capable geovisualization features. Thus, the first software challenge in the Flair project was to extend the measurement and control system, based on the LabVIEW platform (Jeffrey, 2006), with real-time map display capabilities. This was performed by coupling LabVIEW and xDash (Ben Gaid et al., 2020) tools.
Another originality of our approach comes from the use of a synchronous/reactive abstraction for the data acquisition, processing and graphical display, including geo-spatial visualization description. As the Flair system requires strong software agility, a synchronous dataflow block-diagram based approach was undertaken, thanks to the use of the xDash tool. This approach is largely used in cyber-physical systems (Broman et al., 2012) modelling (Derler et al., 2012, simulation and rapid-prototyping (Grzegorz et al., 2008) tools like Simulink (Karris, 2008) or LabVIEW, but these tools do not have geo-spatial visualization features.
In this paper, we first describe our approach for the real-time geospatial data visualization and the underlying xDash tool. Then, we introduce the Flair car measurement system. In part 4, we illustrate the real-time geo-visualization xDash-based approach for building the Flair map application. Finally, we present the application of Flair map in methane leaks detection campaigns.

Synchronous programming philosophy
Synchronous programming languages (Benveniste et al., 1994) were developed for safely programming the control algorithms of reactive systems. In these systems, there is basic "sensecompute-act" sequence that have to be repeated. Synchronous programming languages relies on a fundamental idealization : the synchronous abstraction. In this abstraction, timing events are abstracted in logical ticks, and computations in one tick are assumed to be instantaneous. They have interesting theoretical properties, allowing their programs to be formally validated.
In our application, we have to handle an analogous periodic "sense-compute-display" sequence. The execution engine of the used xDash tool, relies on these principles.

Rapid-prototyping
State of the art measurement and control software allows for quickly developing application logic (Broman et al., 2012) by assembling blocks of functions for forming a block-diagram (Karris, 2008), following the synchronous programming paradigm. Then, program variables are associated to widgets by drag and drop. As we work in part of a research project, where chemical species to measure as well as measurement equipment change frequently, our software needs to have this agility.

xDash
xDash is a web-based software, whose ambition is to allow technicians, scientists or engineers, not specialists in web technologies, to build and share their own interactive web applications. xDash follows rapid-prototyping principles, described above.

The xDash execution engine
The xDash execution engine implements a synchronous/reactive scheduling algorithm. Computation modules, called datasources, are the nodes of a direct acyclic graph (DAG) where edges are data dependencies. This allow users to express computations to perform as block diagrams whose execution follows synchronous principles. Datasources produce JSON (JavaScript Object Notation) variables that are kept into a common workspace of xDash.
The graph is executed on the web-browser and data (or operations) flow as JSON variables. In fact, JSON is simple and versatile: it can handle simulation run results, CSV(Comma-Separated Values) information, geographic information (like GeoJSON), and, even web-services results.
Datasources in xDash are stateless and can be periodic or not. A datasource may have one or more inputs, when it hasn't an input it is called a "source". However, a datasource must have at least an output (i.e. the result). Each datasource have these possible status: -"None": is the initial status and occurs at the beginning when a datasource is not executed yet. It can also occurs when the execution of a datasource is interrupted by user for example -"Pending": is the intermediate status and occurs all along datasource execution (computation) -"OK": is a final status and occurs when a datasource finishes its computation with success -"Error": is the opposite of "OK" status, it occurs when errors happen during computation The DAG is executed using a single thread scheduler and can handle the asynchronous nature of web-services. Each operation (datasource) cannot be executed until all its predecessors have been executed and returned the "OK" status. If a datasource returns "Error" status, the sub-graph, to which all its successors belong, will not be executed. Besides, any datasource can be forced to be executed by the user. In that case, the scheduler algorithm verify if all its predecessors have been computed in the past before allowing its execution. If at least one of its predecessors hasn't the "OK" status, user will be informed that he couldn't update this datasource. First use-cases with xDash involved mobility-related APIs (Application Programming Interfaces) validation needs. Thus several web-based mapping libraries were evaluated. We finally selected Leaflet.js (Crickard III., 2014) library for several reasons. Leaflet.js has several advantages. First, a clean and well-designed object model. Also, a complete and simple documentation. Finally a wide range of available plugins shared by an active community.
For specific Flair map project requirements, quick real-time rendering was a supplementary pre-requisite. Leaflet.js successfully fulfilled this requirement.

FLAIR MAEASUREMENT SYSTEM
Flair car ( Figure 1) comprises a pump allowing gas sampling at 2.5 and 0.5 meters from the ground level. It contains several sensors such as a Picarro G2201-I analyzer, GPS and weather stations (AIRMAR), an Elements'atmo Ultraviolet (UV) spectrometer, a computer and a real-time visualization software. The whole gas sampling material (such as tedlar bags, drill, pump) is also brought to complete on-site measurements with further laboratory tests (Rouchon et al., 2017).
Methane (CH 4 ), ethane (C 2 H 6 ), carbon dioxide (CO 2 ), water vapor and δ 13 C (the stable isotopic composition of carbon) in CH 4 molecules are recorded by the Picarro analyzer. The Elements'atmo UV spectrometer is mainly dedicated to detect odorous tetrahydrothiophene (THT) and mercaptant molecules. The AIRMAR weather station records temperature, barometric pressure, wind velocity and wind direction (corrected from car motion). Flair map corresponds to the real-time viewing software on board the PHEV.
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B4-2020, 2020 XXIV ISPRS Congress (2020 edition)

Using xDash for developing the real-time display software
An xDash project was created. Three dependant datasources were defined :  measurements : REST web-service call to LabVIEW to poll for measurements. Executed every 1 second. Measurement are received as JSON object  CH4_heatmap_config : JSON configuration of display of measurement points on the map : min and max for measurements colour scale, measurement point radius, opacity, and auto-scale options.  CH4_data_point : aggregated JSON object from previous datasources outputs, to be displayed by the Leaflet-based mapping widget. Each single measurement is displayed as a circle whose colour is defined by the colour map ranging between min and max values Datasources outputs are illustrated in Figure 2.   The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII- B4-2020, 2020XXIV ISPRS Congress (2020 This contribution has been peer-reviewed. https://doi.org/10.5194/isprs-archives-XLIII-B4-2020-775-2020 | © Authors 2020. CC BY 4.0 License. Finally, a standalone web-page is generated from xDash. It can be displayed using a web-browser. It constitutes "Flair map real-time" visualization software. This page can also be converted to an Android or an iOS app using the Apache Cordova software (Camden, 2015). Detection of abnormal gases in the ambient air corresponds to very small variations in gas concentrations. One important aspect of real-time analysis is the ability to change live the min and max range of displayed points colour map, using the double-slider widget. The wind direction and speed guide the driver to find gas leaks.
Real-time visualization is useful for optimizing gas sampling. Indeed, in the case of diffusive leaks from the ground (recorded from the Flair car sniffer rake), real-time visualization makes it possible to precisely locate the sampling area. The three maps below in Figure 7 show the simultaneous recordings of methane (CH 4 ), ethane (C 2 H 6 ) and the relationship between these two molecules (C2 / C1) near the gas injection wells. These maps show exactly where the wellhead is leaking. The C2 / C1 ratio equal to 5% corresponds to the ratio found in natural gas. Thanks to the real-time visualization (Flair map), soil and gas samples taken in this area have confirmed the diffuse leak from the well. In the context of field campaigns, the possibility of modifying the xDash project by any user was very helpful, in particular for correcting few bugs on the field. One field example was the need to correct sign error in the NMEA (National Marine Electronics Association) 0183 conversion to JSON from GPS module.

Post-analysis of measurements
LabVIEW records the field measurement in several CSV files.
The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Volume XLIII-B4-2020, 2020 XXIV ISPRS Congress (2020 edition) Figure 8. Post-analysis Flair map dashboard : CSV These CSV files are then opened in Flair map post-analysis dashboard for the purpose of analysis and filed report generation. This dashboard allows also to display statistical information about the wind, as shown in Figure 9.

CONCLUSIONS AND PERSPECTIVES
This paper presented the Flair map software and its application for methane leaks detection. The building of the Flair map application using xDash was detailed. The underlying methodology is general and can be applied to other geo-spatial data acquisition projects. The benefits of using rapidprototyping methodology were also illustrated.
As collected data size increases, the need for a database is increasing. Future version will rely on a Warp10 (www.warp10.io) database system for data storage. Plume modelling based on data recorded by the Flair car is now under study and will soon be added to the post-analysis software.