Open Plot Project: an open-source toolkit for 3-D structural data analysis

In this work we present the Open Plot Project, an open-source software for structural data analysis, including a 3-D environment. The software includes many classical functionalities of structural data analysis tools, like stereoplot, contouring, tensorial regression, scatterplots, histograms and transect analysis. In addition, efficient filtering tools are present allowing the selection of data according to their attributes, including spatial distribution and orientation. This first alpha release represents a stand-alone toolkit for structural data analysis. The presence of a 3-D environment with digitalising tools allows the integration of structural data with information extracted from georeferenced images to produce structurally validated dip domains. This, coupled with many import/export facilities, allows easy incorporation of structural analyses in workflows for 3-D geological modelling. Accordingly, Open Plot Project also candidates as a structural add-on for 3-D geological modelling software. The software (for both Windows and Linux O.S.), the User Manual, a set of example movies (complementary to the User Manual), and the source code are provided as Supplement. We intend the publication of the source code to set the foundation for free, public software that, hopefully, the structural geologists’ community will use, modify, and implement. The creation of additional public controls/tools is strongly encouraged.


Introduction
In the last years the rising availability of new technologies and high-quality 3-D seismic data has implied the increasing use of truly 3-D geological models.Due to this, methodolo-Correspondence to: S. Tavani (stefano.tavani@ub.edu)gies have been developed to integrate surface and sub-surface geological data to build geologically constrained 3-D models (e.g.Fernández et al., 2004;Frank et al., 2007;Calcagno et al., 2008;Suzuki et al., 2008;Carrera et al., 2009;Caumon et al., 2009;Jessel et al., 2010).However, the information used for building 3-D models commonly includes a limited suite of available data, particularly for data collected in the field.The geometries of geological surfaces, like faults and layers, are by far considered the most important data.Methodologies for the construction of geological models rarely incorporate other information, like the attributes of the deformation pattern, which can be crucial for extrapolating data into the undersampled portions of the aimed model (e.g.Thorbjornsen and Dunne, 1997;Tavani et al., 2006).Tools for structural data analysis implemented in commonly used 3-D CAD-like geological modelling software, like GoCad (by Paradigm), 3-Dmove (by Midland Valley Exploration) or 3-DGeoModeller (by Intrepid Geophysics and BRGM), are neither free nor open-access, and can have limitations in the interactive structural data selection, managing and subsequent analysis.This also affects the managing of bedding attitude data.Robust methodologies for 3-D reconstruction based on consistent bedding data interpolation and extrapolation require the use of in-house developed tools (e.g.Carrera et al., 2009).In addition, widely used software for structural data analysis does not incorporate 3-D tools (or these are quite basic) and the "communication" between the 3-D modelling software and the structural data analysis tools is frequently neither simple nor direct.Therefore, the whole process of 3-D reconstruction requires frequent and timeconsuming passages between different CAD-like tools, software for structural data analysis, and in-house developed routines (e.g.Fernández, 2004).
In this work we present the Open Plot project software, a stand-alone structural data analysis software including a 3-D tool for data managing.The intents of the Open Plot project are: (1) reducing the gap between CAD-like software for 3-D modelling and structural data analysis tools, and (2) providing an advanced toolkit for structural data analysis.The software is entirely written in RealBasic 2009r2 (RealSoftware Inc, 2009), a multi-platform basic language (running on Linux, Windows and Mac), which includes a 3-D control and represents an optimal compromise between speed, 3-D graphic quality and programming easiness.The last point is particularly important to us, as the main intent of the Open Plot project is to provide an open source code (the code is here provided as Supplement).A set of functionalities are provided in this first release.These have, however, the main purpose of inviting the structural geology community to modify/implement the code, returning it to the community.

Summary of software architecture and functionalities
The main functionalities of the software are described in Fig. 1.These include classical tools, like stereoplot, contouring, histograms and structural transects, which are present in other non-commercial software for structural data analysis (e.g.GEOrient by Holcomb, 2010; OXSStereonet by Cardozo and Allmendinger, 2011; Daisy by Salvini, 2011).In addition, a 3-D environment is present in Open Plot Project, allowing the management of georeferenced structural data (like bedding, fault, joints, mineral lineations etc.) and 3-D objects like meshes, polylines, vectors, dip-domains, etc.Many of these 3-D objects can be directly created within the 3-D framework of Open Plot and "structural" attributes are assigned to them.
The complete description of functions and procedures for importing, saving, managing and exporting data is illustrated in the User Manual, which is attached to this work.In this section we summarise the internal workflow of the software.
The working philosophy of Open Plot project is schematically illustrated in Fig. 2. Three different types of data can be loaded, converted into the Open Plot format (eventually saved) and plotted.Structural data, basic 3-D objects and complex objects: -Structural data are punctual objects, like bedding surfaces, mesofaults, mineral lineations, AMS tensor, and include lineations, planes (eventually with slickenlines), and tensors.For these elements, each record can include user-defined attributes.As an example, a joint with associated spacing, orientation, author, date, lithological information, etc., is a structural datum.
-Basic 3-D objects include "simple" 3-D surfaces (i.e.planar polygons and vertical panels/multipanels), polylines, vectors and triangles.The record associated with vectors, triangles, polygons and polylines can include user-defined attributes and, in all the cases, orientation data are computed for them.On the contrary, vertical multipanels are purely geometrical objects with no attributes.These are used to create and save selections, drape images (like seismic sections or geological cross sections), and to project structural data (including apparent dip) along the multipanel trace (i.e. to create structural transects, e.g.Wise and McCroy, 1982;Tavani et al., 2006).
-Complex objects include triangular meshes and images.In particular, three types of images can be loaded.
(1) Textures: non-georeferenced images, which can be draped on vertical panels.(2) Maps: georeferenced images, which can be draped on meshes.
Structural data and basic 3-D objects can be saved in both *.stv and *.spj format.Complex objects can be saved only in *.spj format.The first format is, in a few words, a NxM matrix of strings with an initial header where the number of columns and rows are specified.Such a format allows easy import of a *.stv file in a spreadsheet, modification and reimport in the Open Plot project (with a simple copy and paste procedure).Data editing and modification in external spreadsheets is thus recommended, although a data editing tool is provided within the software.The structure of *.spj files is, in its first part (where structural data and basic 3-D objects are stored), identical to that of *.stv files.In the second part of the file, points and triangles of meshes (if present) are listed, and then, in binary format, all the images.Structural data and basic 3-D objects can be selected by filtering their attributes and then plotted in five windows: Frequency analysis, 2-D Scatterplot, 3-D Scatterplot, Stereoplot and 3-D View.In the first three cases, a new matrix including only the selected portion of the dataset is generated.This new matrix is sent to the corresponding plotting window, just for data displaying and analysis, not for editing or modification.In the case of stereoplot, the corresponding temporary matrix is linked to the main one and many operations can be performed on the selected portion of the dataset.These include the selection of a new sub-dataset, the assignment of new attributes, and the "storage" of directions that can be used in the 3-D View window to create new data.The functionalities of the 3-D View window are much more complex.Structural data, basic 3-D objects and complex objects can be displayed in this window.Similarly to the Stereoplot window, the displayed objects are linked to the main matrix.Basic 3-D objects can be created/erased here (also with the aid of tools present in the Stereoplot window) and many operations can be performed on the selected dataset.These operations include the projection of data along panels and the selection of sub-dataset, which can be directly sent to the other plotting windows.
As previously described, structural data and basic 3-D objects can be directly imported in a spreadsheet by opening the corresponding *.stv file.Many 3-D objects, including polylines, meshes and planar polygons can be exported in *.DXF format.

Stereoplot
Plot, contouring and tensorial regression of elements in both present orientation and after rotating according to user-defined rotation parameters Filtering by type, sense of slip and orientation Histograms and wind roses Computation of average value and standard deviation for both normal and circular data Identification of clusters by mean shift anaysis

Frequency analysis
Scatterplot; average value, standard deviation, skewness and kurtosis in Xintervals; data frequency contours

3D Scatterplot
Visualization of georeferenced structural data, lines and polylines, dip domains, meshes with draped images (like georeferenced maps or orthophotos), vertical multipanels with draped images (like geological and seismic cross-sections), photos of outcrops.Digitalization of lines and polylines on meshes and multipanels.Cretation and managing of dip-domains, axial surfaces, vertical multipanes and selections.Spatial data filtering Structural transects.Projection of data (including apparent dip) on vertical multipanels according to user-defined directions.

Rotate data
Import/export 3D objects (polylines, meshes and georeferenced images) Additional functionalities, which do not require the loading of data, are present in Open Plot as, for example, the computation of fault slip direction from Riedel structures (Riedel, 1929).

Case study
In this section we illustrate the application of Open Plot project to the Poza de la Sal Diapir case study.Two additional short examples are in the Supplement.Firstly, we summarise the geological setting of the study structure (for its full description see Quinta et al., 2011) and then we describe the procedures we used for data collection and analysis.
The Poza de la Sal diapir is a slightly elliptical structure located in the Cantabrian Mountains (Western Pyrenean Belt, Spain) (Fig. 3).This portion of the belt resulted from the Cenozoic inversion of an Upper Jurassic to Lower Cretaceous basin, which developed during an extensional stage associated with the opening of the of the North Atlantic and Bay of Biscay (Le Pichon and Sibuet, 1971;García-Mondéjar, 1996;Muñoz, 2002).The Poza de la Sal Diapir is located at the eastern termination of an open anticline striking about WNW-ESE (Fig. 3b).This anticline hosts WNW-ESE striking right-lateral faults (resulting from the reactivation of inherited late-rifting extensional faults) and forms part of the Plataforma Burgalesa domain, which is a slightly folded area where Upper Cretaceous post-rift sediments are exposed.The Sierra de Cantabria far-travelled Frontal Thrust and the Ubierna right-lateral Fault System bind the Plataforma Burgalesa domain to the north and to the south, respectively, both of them striking about WNW-ESE in the study area.Oligocene and Miocene growth strata indicate the alpine origin of the Poza de la Sal Diapir but, due to the proximity of major structures having different kinematics, two hypotheses exist about the tectonics framework responsible for the development of the study structure.(1) The diapir represents part of the contractive framework and has developed due to the squeezing of Triassic evaporites in the core of the WNW-ESE striking anticline; (2) the diapir belongs to the right-lateral strike-slip system and has developed at the eastern extensional horsetail termination of the WNW-ESE striking fault system.Field data were integrated with orthophotos interpretation to provide insights about the evolution of the diapir.

Step 1 field data collection
Mesostructural data collected in the field can be directly introduced in Open Plot Pj., together with photographs and sketches of outcrops (Fig. 4), or introduced in a spreadsheet and later imported into Open Plot.Both procedures were used in the Poza de la Sal Diapir, where 77 bedding surface, 408 joints, 341 faults (69 of them having slickenlines) and 37 fault-related deformation structures (i.e.Riedel's elements) where measured.Joints were mostly measured in the western portion of the study area while faults were collected in the entire diapir.The Slickenlines from Riedel function were used to compute the slip direction of faults having associated deformation structures but no slickenlines (Fig. 5).Consequently, the number of faults with a pitch angle was increased to 97.The azimuth and dip of the reference bedding were collected for each datum, although these are not software-defined fields.This allowed rotation of the bedding to the horizontal and analysis of the pre-tilting orientation (and kinematics) of mesostructural data.The rotation function of Open Plot is mainly designed for this purpose.To restore a dataset to the pre-tilting attitude, the reference bedding azimuth must be set as a rotation axis strike, the rotation axis plunge field must be empty, and the reference bedding dip must be set as rotation angle (Fig. 6).It is important to remark that reference bedding azimuth must be expressed with the right-hand rule.

Step 2 data analysis
Once data have been loaded their analysis can start.A geological map and a set of orthopothos were imported in Open Plot Pj and were draped on the Base Box object of the 3-D View window (Fig. 7).This allowed us to interactively select and display data from given areas in the 3-D View window.The presentation of single outcrops or specific areas is skipped here and the cumulative dataset is presented below (Fig. 8).Only data collected in the Upper Cretaceous to Miocene portion of the multilayer are displayed, to ensure the absence of mesostructural patterns developed during the Lower Cretaceous rifting event.The post-rift mesostructural pattern of the Poza de la Sal Diapir includes two sets of orthogonal joints at high angles to bedding and striking NNW-SSE and WSW-ENE, respectively.Extensional faults in their present orientation have rotaxes (rotational axis; i.In outcrops characterised by steeply dipping beds, problems exist for defining the relative chronology between tilting and the development of many elements.In the following we illustrate, as an example, how we managed normal faults (Fig. 9).In the rotated analysis, rotaxes of normal faults are clustered about a WNW-ESE striking direction.We plotted the rotaxes of normal faults in the rotated analysis and, using the draw selection tool in the stereoplot window, we assigned the red colour to normal faults having rotaxes striking WNW-ESE.The stereoplot window was then reloaded (to make effective the colour change) and fault data were analysed in their present orientation.This revealed that, in their present orientation, right-lateral faults having NE-SW striking slickenlines mostly include "red" elements.Similarly, N-S striking left-lateral faults mostly include "red" elements.This implies that NE-SW striking right-lateral faults and N-S striking left-lateral faults probably represent a tilted conjugated normal fault system.
A similar problem affects reverse faults having rotaxes striking about NNW-SSE.These few elements are at a high angle to bedding and are not present in the unrotated analysis (Fig. 8).Following the above-described procedure we recognised that in the unrotated projection, these elements are steeply-dipping normal faults.A consistent interpretation is that NNW-SSE striking normal faults include both pre and post-tilting elements and, accordingly, these could be syndiapir.NNW-SSE striking joints, which run parallel to the above described extensional fault set, would be syn-diapir too.The same is for WSW-ENE striking normal faults and joints, which are characterised by ambiguous crosscutting relationships with the WSW-ENE striking extensional elements.Accordingly, the working hypothesis is that the diapir has developed within a stress field having a positive near vertical σ 1 and two negative components oriented NNW-SSE and WSW-ENE.
As explained in Quintà et al., (in press), the interaction between doming-related and regional stress fields is expected to produce variations of the orientation of the local stress field (and accordingly of the strike of syn-diapir elements), which depend on the polar coordinates with respect to the diapir centre (Fig. 10).To evaluate if NNW-SSE and WSW-ENE striking extensional elements were characterised by azimuthal variations around the diapir, we proceeded as fol-lows: The dataset was imported in a spreadsheet and the coordinate of each element with respect to the diapir centre was computed.Another field was created corresponding to the azimuth computed in the 0-180 • range.This new file was then in Open Plot (using the copy and paste procedure illustrated in the User Manual).As joints are much more abundant than faults (and have been specifically collected for this analysis) we analysed joints azimuth around the diapir.In particular, data from the western portion of the diapir were analysed (377 joints data), their position is closely spaced.The few joints collected in the other portions of the diapir were not used, due to their sparse spatial distribution.To do this, joints were selected in the data selection window and then in the 2-D scatterplot window their polar angle (X-axis) vs. their azimuth in the 0-180 • range (Y-axis) was plotted (Fig. 11a).Slight but significant variations of the joints' azimuth were observed at different polar angles.However, the joints were mostly located in the western portion of the diapir (due to exposure conditions), which affects the reliability of the result.
In the area of the Poza de la Sal Diapir limestone karstification enhanced fracture traces, allowing us to integrate previously presented data with fractures traces digitalised on orthophotos.A digitalising tool is present in the 3-D View window of Open Plot, enabling the creation of vector objects.However, due to the big size of orthophotos, fracture traces in the Poza de la Sal area have been digitalised using a GIS software (QuantumGIS®) (Fig. 11b).The digitalised polylines (628 data) have been exported as ESRI Shape File (*.Shp) and, using the import *.shp → import as 2-D vector tool of Open Plot, these were imported as vectors.We followed the same procedure described for joints and we computed the polar coordinates of each vector with respect to the diapir centre.The azimuth of digitalised fracture traces was then analysed in the 2-D scatterplot, displaying the same  trends of joints (which ensures that most of fracture traces belong to joints) but in a wider range (Fig. 11c).The conclusion is that NNW-SSE and WSW-ENE striking joints slightly change their orientation around the diapir, confirming that the regional stress field acting during the diapir growth was characterised by sub-horizontal minimum and intermediate stress components striking about WSW-ENE and NNW-SSE.The ambiguous crosscutting relationships and the overall poor quality of the outcrops did not allow a definition of which was the minimum stress component.However, the abovedescribed analysis indicated that the most congruent interpretation is that the Poza de la Sal Diapir represents part of the right-lateral strike-slip assemblage.NNW-SSE striking extensional elements would have developed perpendicular to a WSW-ENE oriented σ 3, kinematically induced by the right-lateral movement along WNW-ESE oriented rightlateral faults (e.g.Sylvester, 1988).In the extensional horsetail termination of this right-lateral fault system, an inversion between s2 and s1 occurred, thus s2 oriented NNWSSE.Accordingly, joints striking WSW-ENE have to be regarded as cross-joints (e.g.Gross, 1993) developed perpendicularly to σ 2.
In conclusion, the use of Open Plot Pj. allowed us to deeply analyse the deformation pattern of the Poza de la Sal Diapir since the first steps of data acquisition.The efficient and multiple filtering options of Open Plot permitted us to evaluate the distribution of deformation structures according to their different attributes (like spatial distribution or kinematics).The possibility of tracking the kinematics of different fracture clusters during the passage from present orientation to unfolded attitude resulted particularly fast and in a useful manner.Adding and analysing user-defined attributes (in this case the polar coordinate with respect to the diapir centre) was a rather fast process applied to both data collected in the field and fracture traces easily imported from GIS software.The results obtained in the Poza de La Sal using Open Plot could have been obtained using other software as well.This, however, would have required several time-consuming passages and, in many cases, one-by-one data selection in a spreadsheet.

System requirements
Open Plot project derives from a basic software developed for work in the field with the first low-cost netbooks.Open Plot project preserves the capability of its ancestor of running on computers with low-cost components (tested down to 900 Mhz Intel Celeron M processor, 512 MB of RAM, Intel GMA 900 graphic card) and with both Window XP and Ubuntu8.04 or higher OS (it "should" also run on other Linux distributions, provided GTK +2.8 is installed and the window version runs on Linux under Wine).The version for Mac OS is not provided.However,Mac users can easily compile the code.Although the most part of the windows are correctly displayed on 800 × 480 screens, a minimum screen resolution of 1024 × 600 is recommended.

Concluding remarks
The possibility to easily import different data types from spreadsheets, text files, and other file formats, including meshes and polylines from DXF files, coupled with the simple STV file structure and the presence of a DXF export facility, allow to: (1) easily use Open Plot project as a sort of structural add-on of CAD software, (2) use Open Plot together with other structural tools; (3) use it as a stand-alone toolkit.
In the first case, Open Plot project represents an external add-on allowing import from different sources and managing together both georeferenced structural data and 3-D objects (like meshes and polylines), thus enabling the limitations of much CAD-like software in the import and management of "structural" data to be bypassed.These limitations can include, for example, the difficulties in making spatial or attribute queries, the difficulties in importing user-defined data attributes, the possibility of customizing the extraction of dip-domains from polylines, the handling of axial surfaces, and the definition of projection directions.These and others limitations can be partially (even totally) bypassed by acquiring specifically-developed add-ons that, however, in most of the cases are neither free nor open source.Consistent and structurally-validated dip-domains created within Open Plot Project can be exported as DXF meshes and then imported in CAD software, where tools not present in Open Plot project can be used to create and manage consistent volumetric models from these and other information.
The possibility of selecting data according to (1) userdefined numeric and alphanumeric attributes, (2) spatial distribution, and (3) attitude, together with the possibility of digitalising vectors and polylines on DEM or georeferenced images (including geological map), allows us to "export" selected data also toward structural software including analysis tools not yet implemented in Open Plot project (like fault  � Fig. 10.Map view of the relationships between fracture/stress strike and polar coordinate in a diapir where the acting stress field results from the interaction between regional and doming-related components (See Quinta et al., 2011).data inversion).Once a sub-dataset is selected, if data are saved as *.stv, the state (i.e.selected or deselected) of each datum will be written.Importing data in a spreadsheet allows us to manage data and export the desired portion of the dataset with the desired data fields.This sub-dataset, in turn, can be imported in structural software with specific analysis tools but less developed selection facilities.
On the other hand, the presence of widely-used data analysis tools (stereonets, tensorial regression, histograms with frequency analysis tools, 2-D and 3-D scatter-plots with data density contouring, transect analysis), efficient and different filtering options, a 3-D environment, fast import/export procedures coupled with the intrinsic advantages of an open source software, support the use of Open Plot project as the main platform for data management.

Fig. 4 .
Fig. 4. Procedures to introduce data and photos of outcrops in Open Plot Pj.

Fig. 5 .
Fig. 5. How to use the Slickenlines from Riedel elements utility to get the fault pitch angle.
Define rotation parametersPlot data rotated according to the previously defined parameters

Fig. 6 .
Fig. 6.How to use the rotation function to later project data in their unfolded attitude.
Fig. 7. Procedure for loading maps, draping them on objects in the 3-D view window, and selecting data from an area of interest.

Fig. 8 .
Fig. 8. Stereoplots of mesostructural data collected in the Poza de la Sal Diapir.DN and C.I. indicate the data number and the contouring interval, respectively.
Rotaxes of normal faults in the rotated (after bedding dip removal) projection Slickenlines of right-lateral faults in their present orientation Slickenlines of left-lateral faults in their present orientation

Fig. 9 .
Fig. 9. Procedure for assigning a colour to elements according to their orientation.In this example a red colour is assigned to faults that are normal in the rotated analysis and have rotaxes striking WNW-ESE.The projection of data in their present orientation (plots on the right) indicates that many strike-slip faults are tilted normal faults.
Fig. 11.(a) Scatterplot of polar coordinate vs. azimuth (0-180 • ) of joints.(b) Procedure for importing an ESRI shape file into Open Plot.(c) Scatterplot of polar coordinate vs azimuth of digitalised fracture traces.