PetrophysicsScalable Vector Graphics (SVG) is the new language being developed by the World Wide Web Consortium (W3C) as the Web standard for presentation of vector graphics images.
In this article we introduce some of the tools and methods to help you get a start creating wireline log graphics using the SVG language. You will see that it is remarkably easy to create sophisticated composite log displays.
Most graphics on the web today are in raster (bitmap) formats (e.g. JPEG, GIF, and PNG). These graphics formats contain information about every pixel in the image. Vector graphics, on the other hand, describe an image in terms of shapes, lines and text. Raster graphics files tend to be large and the image quality deteriorates quickly when you try to enlarge or shrink the images. SVG vector files are compact and the images can be viewed at any scale without loss of clarity.
SVG images are ideal for presenting wireline log data because;
Before you can view SVG files you will need viewer software. Adobe has released an excellent, free SVG viewer that lets you view SVG images on your Web browser. You can download the plug-in from the Adobe website.
The plot on the left is an example of how wireline log data can be displayed using the SVG language. The plot is a composite of very simple graphic elements;
Although this sample SVG plot is very simple, you can add tracks, curves, annotations and shading to produce sophisticated composite wireline log displays. In the following sections we will describe the simple steps for creating composite wireline log dispays. |
|
The "plot" on the left is an empty SVG file. All you can see is a blank, rectangular area. The following first two lines in the SVG file "tell" your browser that the file is of type XML and also where it can find the rules for rendering the plot.
The following SVG code fragment defines the width and height of the SVG drawing area in pixels;
Since the XML language requires that all tags must be closed, the SVG file must end with; </svg> |
The SVG plot on the left shows the basic shapes (rectangles)
that define the log and depth tracks and the log header box. The following
code fragment defines the largest rectangle as having an origin at x =
10 and y = 40 and having a width of 150 and a height of 500.
The three rectangles are grouped using the <g> and </g> tags. Graphical elements within these tags can share a common identity and style;<rect x="10" y="40" width="150" height="500"/> <g style="fill:white; stroke:blue; stroke-width:4;"> <rect x="10" y="40" width="150" height="500"/> <rect x="160" y="40" width="50" height="500"/> <rect x="10" y="10" width="150" height="30"/> </g> |
In the SVG plot on the left we have added vertical and
horizontal grid lines to the track that will contain
the wireline log trace. Lines are drawn using the path command. The following
code fragment shows how to draw one of the vertical lines;
The shorthand methods used in the above path command can be interpreted as;<path d="M 25 40 v 500 "/>
The lowercase "v" indicates that the distance is relative (from the line starting point), not absolute (from the plot origin). The line drawing style is defined within the path command using the following code fragment; style=" stroke:black; fill:none; stroke-width:0.3; stroke-dasharray:3 3;" This style definition can be roughly interpreted as a thin, black, dashed line. If you examine the code for the SVG plot on the left you will see that there are 8 vertical dashed lines and one solid line that is slighlty thicker. style="stroke:black; fill:none; stroke-width:.5;" |
The SVG plot on the left shows text annotation in the depth track and
the log header and also some silly annotation in the middle of the plot.
The following code fragment shows the simplest text command;
<text x="100" y="100"> HELLO WORLD </text> This annotation looks terrible because it has default color and stroke characteristics. The following code illustrates how to format (style) the text and also how to position the annotation fragments.
|
The SVG plot on the left shows an example of a wireline log trace. The
easiest way to draw a wireline log trace is by using the "path" command.
The following code fragment shows part of the instructions for drawing the log trace.
The style commands are pretty obvious (red, dashed line). The path command (after d=") can be written in a highly abbreviated format to minimize file size. The above code fragment can be interpreted as;
This process is repeated using x, y pairs until all of the log data is drawn. For each log data point, the x and y position can be calculated using; x = Left + ((LogValue - LeftLogValue) / (RightLogValue - LeftLogValue)) * TrackWidth y = Top + ((Depth - TopDepth) / (BottomDepth - TopDepth)) * TrackLength |
The SVG file on the left has been modified from previous files by changing
the line format and by adding shading. The following code fragment shows
the styling that has produced the effect.
style=" stroke:black; stroke-width:3; fill:green; opacity: 0.60" In the above style command we have added a color fill. By making opacity less than 1.0 we can see the underlying track grid lines. If the opacity command is omitted or set to 1.0 the fill will be solid and opaque. The path data has been modified from previous plots;
... 84.0 540 10 540 z"/> |
|
The SVG file on the left has been modified from previous files to enable various elements of the plot to be made visible or invisible. Some elements of the plot (track border, grids, curve trace and shading) have been assigned identifiers (for example, id="Track"). Simple JavaScript code is used to toggle, on or off, the visibility of these elements. Use the Checkbox form below to change the visibility of the plot elements. Toggle visibility of SVG Plot Elements |
Wireline log displays are usually much longer than they are wide. The Adobe SVG viewer does not have scrolling features that are suitable for these plots. However, an easy way to view long plots is to embed them into simple Web documents. The following code fragment shows an HTML document shell with an embedded SVG image file.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head></head>
<body>
<embed src="../Images/LogSVGDemo_step8.svg" width="500" height="500" type="image/svg+xml" />
</body></html>
Click here to see an SVG Wireline Log Composite plot with scrolling features
SVG graphics files can be copied into Microsoft Word or PowerPoint documents by following these steps.
Henderson Petrophysics offers a number of specialised formation evaluation services to the upstream oil and gas business.
If you want more information on our available services or our fee schedule you can send an e-mail (click on the icon below) or contact us using the following information;
Phone: +61 7 3300 3980 (61 is the country code for Australia and 7 is the area code for Brisbane)
Mobile: +61 407 653342
E-mail: don@hendersonpetrophysics.com