dataesr/scientific-paragraphs-categorization huggingface dataset:
Whatever the data source, or the capture process, the creation of a building footprint in a geographical dataset is error prone. Building footprints are designed with square angles, but once in a geographical dataset, the angles may not be exactly square. The almost-square angles blur the legibility of the footprints when displayed on maps, but might also be propagated in further applications based on the footprints, e. g. , 3D city model construction. This paper proposes two new methods to square such buildings: a simple one, and a more complex one based on nonlinear least squares. The latter squares right and flat angles by iteratively moving vertices, while preserving the initial shape and position of the buildings. The methods are tested on real datasets and assessed against existing methods, proving the usefulness of the contribution.
Related work The need for squaring building footprints is not new, and some algorithms have already been proposed. The first proposition from  [1]  seeks to enhance footprints that are not totally squared in a topographic dataset, because of capture specifications that do not require strict square angles. The algorithm squares almost-right angles while preserving wall regularities such as symmetries and alignments. The algorithm is based on the optimization of an energy function, by moving all the points of the building footprint. The energy is computed according to several constraints: • a squareness constraint to square almost-right angles, • a movement constraint that prevents points from moving too far from their initial position, • a parallelism constraint that forces parallel segments to remain parallel, • an alignment constraint that preserves wall alignments between too close buildings, and • a topology constraint that prevents from topology problems inside a footprint and with close buildings.
Experimental datasets Three datasets were selected for the experiments. The first two are extracts from Open-StreetMap. One covers the small French town Orthez with a variety of building types (residential, apartment blocks, industrial, agricultural). In this area, most OSM buildings are semi-automatically imported from the image segmentation of scanned cadastral maps, which causes some imperfections in the building outline (Figure  5 ). The width of the building outline, the hatching, and the numbers that might cross the outline cause inaccurate generated outlines, with particularly unsquare angles. The dataset contains 7650 buildings. The second OSM dataset is an extract of the city of Würzburg in Germany. Germany is interesting because most of buildings have been manually captured from satellite imagery, which also causes some imperfections that can be corrected by squaring operations.
Results All three datasets are squared using both methods and the results are presented in Figures 6 to  12. In each experiment, we used a threshold of 15 • for squaring right and flat angles, and 8 • for 45 • angles, which means, for instance, that angles from 76 • to 104 • are squared to 90 •. The 15 • threshold derives from cartographic knowledge and is often used in cartographic generalization  [33]. In the Orthez area in France, where buildings are mostly captured by an automatic import from an image segmentation process, many buildings need to be squared. On simple shapes, both methods effectively square the buildings, but the least squares method tends to distort the footprints less (Figure  6 ). On complex building shapes, the least squares performs better according to our visual inspection (Figure  7 ).
In the Würzburg area, in Germany, where buildings have been mostly captured manually using aerial imagery, most of the buildings are already square. In this area, most of the remaining unsquared buildings are correctly squared by the algorithms (Figure  8 ) with a better visual result for least squares applied to complex shapes (Figure  9 ). For the French NMA reference dataset, nearly 70% of the buildings are squared, with significant distortions (Figure  10 ), which was expected because the level of detail is supposed to be lower compared to the cadastral data used in OSM. The effectiveness of the least squares method on complex buildings is confirmed with this third dataset (Figure  11 ). As predicted, the simple squaring algorithm fails for some complex buildings with a large number of vertices, but the least squares squaring does square these buildings properly (Figure  12 ).
The second step is carried out automatically by considering the consecutive building pairs in the alignment: we search for the closest pair of almost-parallel segments, proximity being computed between the centers of the segments. We also carried out experiments to measure processing time for the least squares based algorithm, on a standard desktop computer with a i7 core processor. The median processing time for a building that requires squaring, i. e. , a building with almost-square angles, is 5 ms, and the mean for all datasets is 400 buildings per second. Considering that this a Java implementation where sparse matrix operations are not optimized, we consider this as a good result, meaning it could be used for online rendering with some optimization of the implementation.
Parameterization experiments We only focus on least squares in this section, and there are several types of parameters that can alter the results: weights, stopping thresholds, and thresholds defining what is "unsquare. " With regards to weights, past experiments with least squares show that their setting might be a problem because of sensitivity to the weights. In our case, the configuration of the constraints and their relative importance lead to a very low sensitivity to the weights. We tried different distributions of weights, but the results were very similar in 99% of the cases (only 6 buildings are squared differently in the French OSM dataset when weights vary) (Figure  14 ): test one (T1) was carried out with small variations over the optimum weights, test two (T2) has equal weights for all constraints, and test three (T3) has a greater weight on the constraint that prevents vertex displacement rather than on constraints forcing squareness.
There are two stopping criteria: the iteration number and the norm of the previous displacement. Tests were first carried out on the optimal number of iterations. On one of the datasets, iteration limits were raised from 5 to 500. The results were always the same as all buildings were squared in 5 or less iterations. This shows that our chosen value of 50 iterations was too conservative, so further testing on different types of buildings and different areas should be carried out to estimate an optimal value. We tested different values for the norm of displacements, ranging from 0. 0001 m to 0. 5 m, for a default value of 1 mm. Results show that from 0. 0001 m to 0. 1 m, the squaring is the same, and some squaring results start to deteriorate when the threshold is bigger than 0. 1 m (Figure  15 ), because the algorithm is sometimes stopped before the optimal solution is reached.
Assessment of squared shapes In order to assess how well polygons are squared by both proposed algorithms, the number of almost-right, almost-flat and almost-45 • angles is counted before and after squaring, for every building footprints in the three experimental datasets. A good squaring method would set these three numbers to zero after squaring. Added to the count of almost-right angles, we sum the differences to the perfect angle: a building that has two almost-right angles with angle values of 87 • and 86 • will have a sum of almost-right angles equal to 7. Only footprints that required squaring are kept in the assessment, the other footprints are exactly the same before and after. The ratio of buildings not exactly square varies from one dataset to another: 90% for the French OSM dataset, 80% for the French reference dataset, and 20% for the German OSM dataset.
Comparison with existing methods It is useful to compare these two methods with other implementations. Comparisons were carried out with two other methods: first, the GAEL-based squaring method from  [8] , and then the squaring algorithm implemented in 1Spatial software Radius Clarity TM during the AGENT European project  [3] , inspired from  [1]. The comparison is carried out visually  but also with the same measures as the shape preservation analysis: the number of almostright and -flat angles, the turning function distance, the polygon signature distance, and the surfacic distance. We first compare the least squares to GAEL squaring. that shapes are better preserved by least squares but the signature distance indicates that they are better preserved by GAEL squaring). The three measures confirm that polygons are squared slightly differently (e.
Enhancing OpenStreetMap building layer The first obvious application of enhancing OpenStreetMap building layers is to improve the quality of the multiple maps derived from OSM. But OSM is not only used for visualization purposes, and many applications are now based on OSM, taking advantage of the freely available data covering the globe. For instance, some projects try to create 3D city models from OSM building footprint by extrusion  [10, 25]. Such projects would benefit from square buildings thus producing more realistic 3D buildings. Other OSM-based applications include indoor mapping projects  [11] , or cadastral mapping  [18]. The proposed squaring methods are dedicated to buildings but the diversity of OSM objects also includes other square geographical features, such as sports fields, tennis courts, and pools.
Enhancing remotely sensed building footprints Change detection from satellite imagery may require the generation of remotely sensed footprints  [5]. In order to compare the generated footprints to an existing vector dataset that needs to be updated, the footprints first need to enhanced to be closer to the existing footprints in terms of shape, particularly regarding squareness. For instance, the change detection process from  [35]  generates sketchy building footprints by calculating digital elevation difference (Figure  19a ). In this case, the building is already squared because the polygon is generated from a set of pixels, so it only contains square angles. So, the first step is to simplify the building shape with the building simplification algorithm from  [3, 30]  (Figure  19b ). After simplification, the sketchy outline is removed but the building is still unsquare and we applied the least squares squaring algorithm to obtain a fully enhanced footprint (Figure  19c ) that can be compared to the buildings of geographical dataset to complete the change detection process.
Agent-based cartographic generalization Squaring is a useful operation for the cartographic generalization of buildings, because almost-right angles blur the legibility of the buildings in the map  [30]. Multi-agents based generalization processes such as AGENT  [3, 30]  already use squaring operations to caricature the almost-square buildings. For instance, the AGENT implementation in 1Spatial software Radius Clarity TM makes use of an algorithm derived from  [1] , and the AGENT implementation in the open source software CartAGen  [28]  makes use of the squaring algorithm from  [8]. But such agent-based systems can benefit from several complementary algorithms for the same operation thanks to a trial-error mechanism (Figure  20 ).
Conclusion and further work To conclude, this paper proposed two new methods to square building footprints: a quick and naive method that proved effective for quite simple polygons, and a more robust and flexible method based on nonlinear least squares. The methods have been successfully tested on large building datasets coming from reference data and OSM. The methods have also been compared to two existing methods proving their usefulness. The contribution of this research is also highlighted in three applications of the squaring methods: the enhancement of OSM features, the enhancement of automatic footprint extractions for change detection, and agent-based cartographic generalization. Both proposed methods are available in the open source platform GeOxygene  [12]. Figure  22:  A complex building composed of connected buildings.
To go further, there are several ways to improve the least squares squaring methods. First, many OSM buildings are captured in a "cadaster" way, i. e. , with several adjacent features for buildings with different owners or functions, instead of a single footprint (Figure  22 ). The method currently processes buildings one by one, potentially damaging the adjacency relation. This issue is quite easy to overcome by identifying the vertices shared by several buildings, and processing them only once in a single adjustment. That is how connected roads are processed for instance in  [13]. The automatic identification of cases where the constraint C 5 should be used, also has to be investigated, as in the proposed experiments, we identified these cases manually. For OSM data, the enhancement has not been used to modify the world dataset, but we believe that creating an automated tool to correct OSM building would improve the quality of OSM.
The proposed applications of the algorithm are offline, but would it be possible to use it online, in an application that renders the vectors from OSM, rather than the usual tiled raster maps? We tried the www. josis. org least squares algorithm on twenty random buildings of the reference dataset, and squaring takes less than half a second, on a standard desktop computer, with a non-optimized implementation. This shows that there is a potential for online rendering; further testing is clearly required, particularly regarding the management of complex buildings. But the squaring enhancement has to be used carefully: this is mostly a rendering enhancement, and not necessarily a quality enhancement. On remotely sensed buildings, or on French OSM buildings, we believe that the squared shapes are closer to ground truth than the initial shapes, but that is not guaranteed by our algorithm; our ambition is more guided by visualization caricature, than by preserving ground truth.
PreCisIon requires additionally promoter sequences (or instance like the ones that can be obtained from the RSAT database (  14 )) as input. Figure  1  represents a graphical overview of the procedures and outcomes of the GREAT:SCAN tools. It illustrates the full complement of the computational steps which start from input genomic positions and lead to the generation of rich and informative visualisations and machine readable output files. The relationships between the two different tools is also depicted to highlight the integrative approach in the analysis of genome layout, architecture and regulation which is introduced by the GREAT portal. Each of the two tools in GREAT:SCAN is described below.
Tools GREAT:SCAN command-line tools are developed using a variety of languages (such as R  (18) , Python and Java) and are released using docker  (19) , a virtualisation software allowing the deployment of applications inside software containers. This implementation brings the following advantages. It makes deployment easy, as nothing has to be installed on the host apart from docker. Furthermore, as every process runs in its own environment, which contains all necessary dependencies, the typical problems of missing libraries or version conflicts do not occur. This is a significant advantage as bioinformatics tools require a broad variety of software dependencies.
C. Optical tracking software The core of Madibreast is based on the Open Source Computer Vision Library (OpenCV) with Python bindings. OpenCV is an open-source, state-of-the-art, practical set of software tools for computer vision that focuses on real-time applications. It provides advanced functions for optical tracking of features under BSD license and is widely used for professional real-time computer vision. (16) We modified and included the initial algorithms into a Python program for our purposes. The algorithm can be summarized as follows. A shape detector first identifies the fiducial markers on the skin. The Shi-Tomasi algorithm  (17)  is then used for initial localization of points of interest on each marker. This corner detector analyzes areas of high contrast gradient and locates corners for optimal stability and accuracy of the process.
This issue will be dealt with translation of the Python code into C/C++ code. It is also worth noticing that we used a very high resolution (1920 × 1080, i. e. , 10px/mm), which is not necessary considering the requirements in spatial accuracy we set. The optical zoom capacities of the lens we used are sufficient to decrease the camera resolution to 1024 × 768 or less, and therefore improve speed of image transfer and computation.
Seismic data During summer 2011, a temporary seismometer network (Fig. 1 ) was operational for about 100 days  (Burtin et al. , 2014). The network recorded the seismic signature of several debris flows, including the event on 19 July 2011, on which this study focuses. The seismometers (labeled IGB01-IGB07 and IGB09-IGB10; IGB08 was not fully functional on 19 July 2011) were powered by battery and solar energy (sensor and recording specifications are given in Table  2 ). Ground motion was sampled at 125 or 200 Hz and stored locally. The analysis presented here relies primarily on signal frequencies within the sensors' flat spectral response and for this reason digital counts are converted to ground motion with a single multiplication factor. Burtin et al. (2014)  give more details on the seismic instrumentation.
10 ). For comparison, data transmission and processing requires less time: for instance, 90 % of the data streams of the Swiss Seismological Service are transmitted as 1-2 s packages within 6 s or less (R. Racine, personal communication, 2014). Our grid search is currently implemented in Matlab ® and runs on a single processor. It takes less than 3 s to process a 100 s time window. This time could be further reduced by distributing computation on several processors and/or by limiting the grid search to the vicinity of the torrent channel. Similarly, a search domain, which avoids locations where seismometers reside in the near field, would reduce the grid space in addition to providing numerical stability. Essentially, the ASL locations of the debris-flow front seem reliable in the upper catchment, although they lag behind the in-torrent detections by as much as 10 min on the lower reaches of the debris fan.
Acknowledgements. The salary of F. Walter was partially covered by the  SNF  grant  PP00P2_157551. The  SEIS-UK equipment pool (NERC ) and the  École et Observatoire des Sciences de la Terre de Strasbourg  provided the seismic stations deployed during summer 2011. We thank  Jérôme Vergne  for help with instrumentation and network planning. Seismic equipment and data archiving facilities for station IGN01 were provided by the  Swiss Seismological Service. Yvo Weidmann  helped with the preparation of the Supplement. The comments of Andrew Lockhart and two anonymous reviewers greatly improved the quality of our study and paper. Edited by: Paolo Tarolli Reviewed by:  Andrew Lockhart  and two anonymous referees.
Data availability. Seismic data of IGB01-IGB10 are archived at GFZ Potsdam. Access can be granted by the authors. The record of IGN01 is archived at the Swiss Seismological Service and can be accessed via http://arclink. ethz. ch/webinterface/ (Swiss Seismological Service, 2017). The Supplement related to this article is available online at https://doi. org/10. 5194/nhess-17-939-2017supplement.
A new multi-platform freeware has been developed for the processing and reconstruction of scanning multi-technique X-ray imaging and tomography datasets. The software platform aims to treat different scanning imaging techniques: X-ray fluorescence, phase, absorption and dark field and any of their combinations, thus providing an easy-to-use data processing tool for the X-ray imaging user community. A dedicated data input stream copes with the input and management of large datasets (several hundred GB) collected during a typical multi-technique fast scan at the Nanoscopium beamline and even on a standard PC. To the authors' knowledge, this is the first software tool that aims at treating all of the modalities of scanning multi-technique imaging and tomography experiments.
As such, largefield-of-view measurements become feasible in a few hours of ISSN 1600-5775 measurement time. The principle of the scanning nanoprobe station is presented in Fig. 1. During a usual experiment a large overview map of 2000 Â 2000 pixels ($ 2 mm Â 2 mm) is recorded with millisecond dwell time per pixel. This results in a half-terabyte dataset in about 1 h. The large overview mapping is followed by a more resolved, but slower, scan performed on a 100-200 mm 2 sized region. This produces a similar amount of data in 1-2 h. Obviously, on-line and off-line data processing is a crucial part of the success of the experiments. However, the treatment of such large datasets, regularly generated during synchrotron user experiments, still represents a challenge. These large amounts of raw data have to be imported, reduced, corrected and pre-processed within the time frame of the experiment for on-site data viewing.
Moreover, it must also be feasible to perform these data treatment steps on a standard PC by users for thorough postexperimental data processing in their own home institutes, where they often do not possess a high-performance workstation. Such data-reconstruction software and algorithms must be easy to be used as well by users inexperienced in image processing. In order to cope with these challenges, we have developed a dedicated data processing tool at the Nanoscopium beamline, which will be proposed as freeware for the scientific community. One of the main requirements for such a software tool, both for 2D imaging and tomography, is to extract the physical properties from the samples encoded in the raw data [recorded at SOLEIL in a single NeXus file  (Poirier et al. , 2009) ]. These properties are transformed into images of phase, scattering contrast, absorption contrast and elemental distribution maps.
, 2012)  (a non-exhaustive list). However, they are mostly oriented for full-field imaging and not for scanning imaging. To our knowledge, the open freewares mostly dedicated for scanning X-ray fluorescence (XRF) and X-ray absorption near-edge structure (XANES) applications are PyMCA  (Sole ét al. , 2007) , Mantis  (Lerotic et al. , 2014) , MAPS  (Vogt, 2003) , TXM-Wizard  (Liu et al. , 2012 ) and Axis2000 (aXis2000, 1997). This made it necessary to develop the open-source MMX-I software for the off-line processing of multimodal scanning X-ray imaging and tomography datasets. Taking into account the already existing widely used XRF spectrum-fitting software (e. g. PyMCA), we did not intend to develop such fitting tools for MMX-I. Instead, it is possible to import PyMCA results, namely elemental intensities obtained by fitting each pixel spectra, into MMX-I for further processing.
Software platform and workflow The MMX-I project aims to offer both expert users and beginners the possibility of processing and analysing raw data, either on-site or off-site, for each scanning imaging technique included in the software and any of their combinations. Therefore we have developed a multi-platform (Mac, Windows and Linux 64-bit) data processing tool, which is easy to install, comprehensive, intuitive and user friendly. As software developments based on scripting languages, such as Matlab or IDL, require the installation of rather expensive software packages, we preferred to develop MMX-I in Java. Java has a good synergy with the widely used (by different scientific communities) image processing software ImageJ  (Saalfeld et al. , 2012; Schneider et al. , 2012; Rizk et al. , 2014).