Sedlog Paper
Sedlog Paper
a r t i c l e in fo abstract
Article history: SedLog is a free multi-platform software package for creating graphic sediment logs providing an
Received 24 December 2008 intuitive graphical user interface. The graphic sediment logs generated by SedLog can be exported as
Received in revised form PDF, Scalable Vector Graphics (SVG), or JPEG for use by other drawing applications or for publications.
14 February 2009
Log data can be imported and exported in Comma Separated Values (CSV) format. The logs can also be
Accepted 17 February 2009
printed to any paper size the user wants. Zoom In, Zoom Out, Fit page, Fit Height and Fit Width facilities
are also provided to enable the user to customise the workspace size.
Keywords: & 2009 Elsevier Ltd. All rights reserved.
Sedimentology
Log
Lithology
Software
Java
Graphics
0098-3004/$ - see front matter & 2009 Elsevier Ltd. All rights reserved.
doi:10.1016/j.cageo.2009.02.009
ARTICLE IN PRESS
2152 D. Zervas et al. / Computers & Geosciences 35 (2009) 2151–2159
Some software packages are available, e.g. WinLoG1 or from C and C++ but has a simpler object model and fewer
LogPlot 72 that can use a database of information to generate low-level facilities. Java applications are typically compiled to
sedimentary logs, either as stand-alone utilities or as parts of bytecode which can run on any Java virtual machine (JVM)
larger, integrated suites. Not all are well-suited to the needs of all regardless of computer architecture. Java also provided the Java
geologists: in some cases, the data input is not straightforward, as 2D Application Programming Interface (API). Java 2D API is a set of
parameters may need to be defined at the outset, and output may Java classes for advanced 2D graphics and imaging. It encom-
not have the desired flexibility. The greatest obstacle to the passes line art, text and images in a single comprehensive model.
widespread use of many of these packages is, however, their cost: Using Java 2D avoided a lot of low-level graphics programming,
even if some of the packages can satisfy many of the requirements minimized development time and aided debugging of the
for input and presentation of sedimentological data, they are not application. For Java development, we initially used Borland’s
readily available and affordable for use by students and others JBuilder 2005 foundation but in the latest version of SedLog we
without the resources to purchase the software licences. used the NetBeans IDE4 instead. NetBeans IDE is a free, open-
This problem was recognised by Hoelzel (2004) who described source Integrated Development Environment (IDE) for Java soft-
a program, based on CorelDraw, to draw logs while we were ware development and runs on Windows, Linux, Mac OS X and
developing the software described in this paper. Here we present Solaris. The NetBeans IDE provides a GUI Builder which enables
SedLog, a user friendly multi-platform software written in Java for intuitive GUI design by dragging and dropping GUI components
creating graphic sedimentary logs. We had similar aims to Hoelzel from a palette onto a canvas, which can then be clicked and edited
(2004), but chose to make our application as complete as possible in place.
without any need for other software. SedLog can draw logs by To store and draw lithology patterns and symbols we needed a
dragging and dropping, and also has a full range of patterns and suitable file format, either: (a) as a raster graphics image or
many other attributes built in. The graphic sedimentary logs bitmap or (b) as a vector graphics image. Bitmaps are matrices of
produced by SedLog can be printed directly from the screen or pixels and appear jagged when rescaled or printed. Vector
exported as vector images to other graphics packages. All data can graphics use geometrical primitives such as points, lines,
also be output to spreadsheets (CSV file format) for statistical curves and polygons to represent images and continue to look
analysis or export into other packages that handle sedimentolo- the same when rescaled or printed. Naturally, we decided to
gical or stratigraphic information. Data in spreadsheet format store patterns and symbols in vector file format but developing a
can be imported into SedLog and can be used as the basis parser for a vector file format from scratch would have been a
for drawing a graphic log. The program is available free from major task. So, we used the Scalable Vector Graphics (SVG)
www.sedlog.com. file format and the Batik5 free library for parsing them instead
of writing our own parser. SVG is an XML specification and
file format for describing two-dimensional vector graphics, both
2. Development static and animated. It is an open standard created by the
World Wide Web Consortium’s SVG Working Group. Batik is a
Our objectives in developing the software for graphic sedi- pure-Java library that can be used to render, generate and
mentary logs were as follows: manipulate SVG graphics.
For exporting the logs to PDF, we used the iText6 library
1. The graphic log output should closely resemble the formats (Lowagie and Soares, 2007) which is an open-source library for
commonly used by geologists in publications. creating and manipulating PDF, RTF and HTML (respectively,
2. The layout, patterns and symbols used in creating the graphic Portable Document Format, from Adobe; Rich Text Format, from
log should be flexible enough to accommodate the different Microsoft; and Hypertext Markup Language) files in Java, and is
layouts and conventions used by sedimentologists and others. distributed under the Mozilla Public Licence with the LGPL (GNU
3. Graphical output should be importable into graphics software Library General Public Licence) as alternative licence.
packages to allow final modifications to the appearance of the We started development by creating a simple prototype which
output. took about 3 months. Then, we gave the prototype to various users
4. All the data about each bed should be stored in ASCII format to and we started adding features and modifying it according to their
permit export of the data to other packages or for statistical comments.
analysis to be carried out.
5. Data in ASCII format should be importable into the program
and used to generate graphic logs. 3. SedLog description
6. The program should be relatively self-explanatory, such that a
new user could input data and generate logs in a simple format SedLog provides an intuitive graphical user interface, making it
without requiring reference to an instruction manual. very easy for anyone to use with minimum effort. The graphic
7. The program should be freely available. sediment logs generated by SedLog can be exported as PDF, SVG,
or Joint Photographic Experts Group (JPEG, for bitmapped images)
One option for a Graphical User Interface (GUI) and graphics for use by other drawing applications or for publications. Log data
intensive application is Borland C++ Builder because of its strong can be imported and exported in CSV format. Comma separated
GUI design facilities and the speed of the C++ language. We values (CSV) files store tabular data and can be generated and
selected, however, Java3 for its cross-platform operability. Java is a imported by any spreadsheet application (such as MS Excel, MS
programming language originally developed by Sun Microsystems Works Spreadsheet, StarOffice Calc, Quattro Pro, etc.). The CSV file
and released in 1995. The language derives much of its syntax
4
NetBeans Integrated Development Environment (IDE) for Java software
1
WinLoG Version 4, http://www.gaea.ca, 2007, from GAEA Technologies development official web page: http://www.netbeans.org/.
5
(Whitby, Ontario, Canada). Batik free Java library used to render, generate, and manipulate SVG graphics
2
LogPlot Version 7, http://www.rockware.com, 2007, from RockWare Inc. official web page: http://xmlgraphics.apache.org/batik.
6
(Golden, Colorado, USA). B. Lowagie and P. Soares, iText (software), release 2.0.7, Nov. 28, 2007,
3
Java official web page: http://www.java.com. 1999–2007, http://www.lowagie.com/iText.
ARTICLE IN PRESS
D. Zervas et al. / Computers & Geosciences 35 (2009) 2151–2159 2153
format does not require a specific character encoding, byte order, pertaining to a bed can be edited subsequently. On the input page,
or line terminator format making it platform independent. Below a series of drop-down menus provide options for recording
is a sample CSV file opened by a text editor: information about the bed. These include:
‘‘THICKNESS (CM)’’,‘‘BASE BOUNDARY’’,‘‘LITHOLOGY’’,‘‘LITHOL- (a) Lithology, including the option of recording the proportions of
OGY %’’,‘‘GRAIN SIZE BASE’’,‘‘GRAIN SIZE TOP’’,‘‘SYMBOLS IN BED’’ up to three different lithologies for a single bed; by default the
100,‘‘/noneS’’,‘‘Limestone’’,100,‘‘vf’’,‘‘vf’’,‘‘Intense bioturbation’’ first lithology entered is 100%; a set of patterns are provided
45,‘‘Sharp’’,‘‘Shale’’,100,‘‘clay’’,‘‘clay’’,‘‘/noneS’’ for the most common lithologies and are displayed in the
45,‘‘Erosion’’,‘‘Conglomerate’’,100,‘‘pebble’’,‘‘granule’’,‘‘Cepha- drop-down menu.
lopods’’ (b) Type of basal contact, gradational, sharp or erosional.
135,‘‘Gradational’’,‘‘Sandstone’’,100,‘‘vc’’,‘‘m’’,‘‘Trough cross bedd- (c) The grain size at the base and at the top of the bed (the basal
ing’’ grain size is assumed for the whole bed unless a size is
65,‘‘/noneS’’,‘‘Sandstone’’,100,‘‘m’’,‘‘m’’,‘‘Planar cross bedding’’ entered for the top): the menu provides name descriptors
50,‘‘/noneS’’,‘‘Sandstone’’,100,‘‘f’’,‘‘f’’,‘‘Current ripple cross- such as ‘coarse sand’, ‘medium-fine sand’, but the program
lamination’’ also records the equivalent phi scale value (Krumbein, 1934).
60,‘‘Sharp’’,‘‘Siltstone’’,100,‘‘silt’’,‘‘silt’’,‘‘/noneS’’ On the graphic log these are displayed using a scale with
35,‘‘/noneS’’,‘‘Coal’’,100,‘‘/noneS’’,‘‘/noneS’’,‘‘/noneS’’ increasing grain size towards the right.
65,‘‘Sharp’’,‘‘Siltstone’’,60,‘‘clay/silt’’,‘‘clay/silt’’,‘‘Moderate bioturba- (d) Sedimentary structures ‘within the bed’: a variety of symbols
tion’’ is available to represent the commonest structures (trough
cross bedding, symmetrical ripples and so on) and can be
The logs can be printed to any paper size. Zoom In, Zoom Out, displayed as single symbols or as tiled symbols filling the
Fit page, Fit Height and Fit Width facilities are also provided to grain-size ‘curve’. The lithology patterns can also be inserted
enable the user to customise the workspace size. Sediment log into the grain-size column to create the merged lithology/
files generated by SedLog have the *.SLG extension. Template files grain-size arrangement which is also commonly used.
generated by SedLog have the *.TEM extension. SLG and TEM can (e) Symbols ‘beside the bed’: sedimentary structures, fossils and
be opened and modified only from SedLog. bioturbation features can all be displayed, either singly or in
combinations in a column.
(f) A ‘Notes’ column allows for text of numerical information to
3.1. Data input in SedLog be entered.
Fig. 1. Data input menu, main interface in SedLog for entering data bed-by-bed.
ARTICLE IN PRESS
2154 D. Zervas et al. / Computers & Geosciences 35 (2009) 2151–2159
Fig. 2. Default layout for a graphic sedimentary log in SedLog. Columns may be added or removed, names and order of them changed and widths of columns modified.
with all or some of these columns, or using some of the following (d) Columns for stratigraphic information: ‘Age’ and ‘Formation’
additional columns: columns are intended to be placed on the left side of the log,
with boundaries between stratigraphic units entered at the
appropriate bed and names displayed with text aligned
(a) Bioturbation: this column may be used to display symbols for vertically.
different types of ichnofauna plus a value to indicate the (e) Three further user-defined columns are available for entering
intensity of the bioturbation (Droser and Bottjer, 1986). either text or numerical data. These may be used to record
(b) Facies: a useful way of showing the facies is to use a narrow features such as colour, the positions of samples or photo-
column for each facies and filling in the column adjacent to graphs or data that result from geochemical or other analyses.
the appropriate beds (Fig. 3). This format can provide a quick,
visual impression of the distribution of facies within a Any of the columns can be renamed via a layout menu (Fig. 4)
succession, and if the order of the columns is arranged and this menu can also be used to modify a number of other
appropriately, for example with the shallowest depositional aspects of the appearance of the graphic log.
environment on the left and the deepest on the right, then Several different scales are available, from 1:10 to 1:1000;
shallowing or deepening trends can be recognised (e.g. Lønne there are also options on the intervals for display of the numbers
and Nemec, 2004). on the scale and the scale can either measure from bottom to top
(c) Palaeocurrent data is recorded bed-by-bed with multiple for outcrop, or downward for depth in borehole core. The size of
entries for a single bed possible: SedLog stores the data the symbols, the magnification of the lithology patterns and the
numerically, but it can be displayed on the graphic log either font sizes can be adjusted to suit different log scales. The order of
as numbers or arrows with appropriate orientations. the positions of the columns from left to right can be changed as
ARTICLE IN PRESS
D. Zervas et al. / Computers & Geosciences 35 (2009) 2151–2159 2155
Fig. 3. Customised layout, including columns for stratigraphic information on the left, facies columns, bioturbation and palaeocurrent data.
required, and the name of the column customised. The default are divided into four groups on the input menu: basic, carbonate,
title at the top of the grain-size scale is a dual clastic and volcanic and special. Symbols are also grouped into sedimentary
carbonate scale, but either can be used on its own. The title of the structures, fossils, trace fossils and ‘other’. Any of the patterns and
log is also inserted via this menu. symbols can be reassigned by changing the name associated with
An important consideration in the design of SedLog was the it. Furthermore, new patterns and symbols can be added by
desire to allow the user as much flexibility as possible in the importing a graphic drawn in another software package and
appearance of the output, although there are some limitations: for naming it. Graphics must be imported in SVG or Compressed
example, the total number of columns available is fixed and Scalable Vector Graphics (SVGZ) format, and some trial and
symbols can be inserted only into some columns. The width of error is usually required to achieve an appropriate scale of the
columns can be modified on-screen by click-and-drag of the image prior to importing the graphic. A separate menu screen
column boundaries. Once a layout has been created it can be facilitates the import of user-created patterns and symbols
saved as a template for multiple data sets. (Fig. 5). This makes it possible for a user to design and import a
A set of patterns for the most common lithologies are available, complete set of their own patterns and symbols, also in colour for
divided into four groups on the input menu: basic, carbonate, use in SedLog.
volcanic and special. New lithologies and patterns can be added,
or the existing names and patterns modified (see Section 3.3). The 3.4. Graphic output from SedLog
lithology column may be divided to show up to three different
lithologies by proportion within a bed: if only one lithology is 3.4.1. Screen images
entered it is assumed to be 100%. The graphic log is generated by entering data for each bed via
the input screen. This can be done systematically bed-by-bed
starting from the bottom, but beds can be inserted at any point in
3.3. Further customising of the graphic log the succession. Individual beds can also be copied or cut and
pasted to change their position in the succession. The graphical
The program is provided with a number of different sets of interface of the log display means that beds can be selected by a
patterns and symbols. Patterns for the most common lithologies mouse click and cut, copied or the input menu opened to modify
ARTICLE IN PRESS
2156 D. Zervas et al. / Computers & Geosciences 35 (2009) 2151–2159
Fig. 6. As a log is generated all lithology patterns and symbols used are stored and can be output as a log key.
Table 1
Example of a CSV input file’s contents.
Thickness Base boundary Lithology Lithology (%) Grain size base Grain size top
data are stored as comma-delimited strings that can be exported names in the data can be matched to those in the layout. All the
into rose diagram plotting programs. When data are stored as information to create a graphic log could be entered into a
descriptive text, macros can be used to convert the information spreadsheet, and there may be circumstances where this
into numerical values for the analysis of the proportions of approach is quicker or more convenient than using the SedLog
lithologies, occurrence of sedimentary structures, fossils and so input menu, for example when using a Portable Digital Assistant
on. Geochemical or other analytical data may be incorporated (PDA) in the field (a PDA version of SedLog with a graphical
with lithological information from the log. Data exported from interface was considered but this was beyond the scope of the
SedLog can be imported into any program that uses ASCII format: current project). There can be advantages to editing a log using
in a pilot study data from SedLog files has been used in ‘Petrel’ by the data in spreadsheet format, particularly where the same
Schlumberger7 and successfully incorporated with other strati- information needs to be added to a number of beds as this can be
graphic information. more quickly achieved by pasting into a spreadsheet instead of
using the input menu for each bed.
3.5.2. Data import into SedLog
SedLog includes a ‘wizard’ which can be used to take data from
a CSV spreadsheet and use it to draw a graphic sedimentary log.
4. Application
For an example of a file’s contents see Table 1. The file can have
additional columns such as more than one lithology for each bed,
During the development of the program it was used in a
notes, facies, symbols, etc.
number of research projects that involved the recording of data
If the data have been arranged in the column order used in the
from succession of strata in different settings. Output from SedLog
current SedLog layout, import is automatic, otherwise the column
was subsequently used for the presentation of results in reports
and research theses. From a user’s perspective, the following
7
http://www.slb.com/content/services/software/geo/petrel/index.asp. aspects of the program were found to provide significant benefits
ARTICLE IN PRESS
2158 D. Zervas et al. / Computers & Geosciences 35 (2009) 2151–2159
(a) Data input is straightforward and does not require a template Collinson, J., Mountney, N., Thompson, D., 2006. Sedimentary Structures. Terra
to be set up at the outset; the facility to change the layout, Publishing, England 292pp.
ARTICLE IN PRESS
D. Zervas et al. / Computers & Geosciences 35 (2009) 2151–2159 2159
Droser, M.L., Bottjer, D.J., 1986. A semiquantitative field classification of Lønne, I., Nemec, W., 2004. High-arctic fan delta recording deglaciation and
ichnofabric. Journal of Sedimentary Research 56, 558–559. environment disequilibrium. Sedimentology 51, 553–589.
Hoelzel, M., 2004. StratDraw: automatic generation of stratigraphic sections from Stow, D.A.V., 2005. Sedimentary Rocks in the Field. Manson Publishing, England
tabulated field data. Computers & Geosciences 30, 785–789. 320pp.
Krumbein, W.C., 1934. Size frequency distributions of sediments. Journal of Tucker, M.E., 2003. Sedimentary Rocks in the Field. Wiley, England 244pp.
Sedimentary Petrology 4, 65–77.