You are on page 1of 13

Technical Note

Product: All Products using Datamine format (.dm) files

Version All

Summary: Datamine File Format Description

References: www.datamine.co.uk

PLEASE NOTE THAT THIS DOCUMENT MUST NOT BE DISTRIBUTED TO


THIRD-PARTY SUPPLIERS OF SOFTWARE WITHOUT PRIOR
CONSULTATION WITH DATAMINE CORPORATE LIMITED

INTRODUCTION

Datamine files are composed of one or more 2048 bytes binary records. Each record is
usually referred to as a "page". This document describes the structure of each page, to
assist developers in writing applications to read Datamine files.

There are two forms of file in use by Datamine, which contain either single or double
precision data. Both forms follow the same overall storage scheme, but store data in
either single or double precision. Files contain either single or double precision data:
data types are not mixed within a single file.

Mineral Industries Computing Limited (which owns the copyright to the Datamine
product) makes no guarantee that the file structure described here will be retained in
future.

THE DATAMINE SDK

For any third party wishing to interface to Datamine files Datamine Corporate strongly
recommends using the Datamine File Software Development Toolkit (SDK). This has been
designed to be used from a variety of different programming languages.

GENERAL COMMENTS

All files used by Datamine have the same logical structure. Whether the file stores point
data, drill hole data, deposit models or anything else, the same structure is used. The
first file page contains the Data Definition, which details the number of records stored,
and the fields and field types used. Subsequent pages contain the actual data.

The file does not contain any specific description of the purpose for which it was created.
In other words, there is no "file type" parameter that says that "this is a drill hole file" or
"this is a model file", etc. The programs that use the file examine the list of fields (as
described by the data definition) to decide on whether the file is appropriate for a
particular use. The fields contained in the common file types are described starting on
page 4.

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


1
In early implementations of Datamine, database structural information was stored in the
last four words of each page. These words should be ignored. Therefore, each pages
can contain up to 508 words of useful information.

Single Precision files

Each page in a file is 2048 bytes, or 512 32-bit words, long. All numeric values are
stored as 32-bit ("single precision") floating-point values, even if the value stored is
always an integer. Alphanumeric values are stored 4 bytes to each 32 bit word. No
other data types are used.

Double Precision files

Each page in a file is 4096 bytes, or 512 64-bit words, long. All numeric values are
stored as 64-bit (“double precision”) floating-point values, even if the value stored is
always an integer. Alphanumeric values are stored in the first 4 bytes of a 64-bit word,
with 4 bytes in each word “reserved”. No other data types are used.

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


2
THE "DATA DEFINITION" PAGE

The first pages in any file contain a description of the structure of the file, and the names
and types of the logical fields stored. The Data Definition is described in the following
table:

Word number Description Notes

1 -- 2 File name. Alphanumeric, Ignored in current


uppercase, up to 8 bytes. version

3 -- 4 Directory name, Alphanumeric, Ignored in current


uppercase, up to 8 bytes. version

5 -- 20 File description. Up to 16 words of


descriptive text.

21 -- 22 File owner. The user name that was Ignored in current


current when the file was last version
updated. Alphanumeric, uppercase.

23 Access permissions for the file 0: Read/write access


owner. Default value = 0 permitted,
1: Read only access
permitted,
2: No access permitted.
24 Access permissions for other users. See above.
Default value = 2

25 File type key See notes below.

26 Number of words in each logical


data record.

27 Number of physical pages in the file

28 Number of logical records in the last


page of the file.

Note: Word 25 in a DD was unused up to the introduction of double


precision files. Subsequently, a file type identifier was inserted.
This is 987654.0 (single precision) in single precision files, and
456789.0 (double precision) in double precision files.

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


3
Files are either “single precision” or “double precision”. Single and double precision
values are not mixed within one file. Only two data types are used: numeric and
alphanumeric. Numeric values are single or double precision, real values only; no
integer fields are supported. Alphanumeric fields are specified as a groups of one or
more 4-character "sub-fields". For example, an alphanumeric field may be created to
contain up to 12 characters of data. The data will be stored in three sub-fields, and
there will be three entries in the Data Definition for the field.

Following the first 28 words in the Data Definition, 7 words of information are stored for
each numeric field or each 4 bytes of each alphanumeric field. Words 29 to 35 contain
details of the first field in the file (or the first 4 bytes of the field if it is alphanumeric).
The same information about the second field is then stored in words 36 to 42, and so on.
A maximum of 64 fields of data (i.e. 64 numeric fields or 64x4 bytes of alphanumeric
data, or any combination of numeric and alphanumeric) may be stored in any single
precision file. Therefore, field specifications in the DD may continue up to words 470 to
476 (being specifications for the 64th field).

In double precision files, the maximum number of fields is increased to 256.


Consequently, the data definition may extend onto 2, 3 or 4 pages. Field information is
stored in these pages according to the following table:

Field Page Words

1 1 29 -- 35

68 1 498 -– 504

69 2 1 –- 7

141 2 498 –- 504

142 3 1 –- 7

212 3 498 -– 504

213 4 1 -- 7

256 4 302 -- 308

Datamine also supports the notion of "implicit fields". An implicit field has an entry in
the Data Definition only, i.e. it is a constant value that is associated with the file.
Datamine applications allow the implicit field to be treated just as any other field.

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


4
Word number Description Notes

29 -- 30 Field name. Alphanumeric, mixed


case, up to 8 bytes

31 Field type. "A " for


alphanumeric,
"N " for single
precision, real numeric.

32 Field position in a logical record, or


zero for an implicit field.

33 Field word number. Always one


(1.0) for a numeric field, otherwise
gives the word number within an
alphanumeric field.

34 Units Ignored in current


version

35 Default value. Numeric or 4 bytes


of alphanumeric data, as dictated by
the field type.

"DATA" PAGES

Each page following the Data Definition will contain the data values. Each page will
contain as many logical records as will fit in the 508 words available. The number of
words in each logical data record is given in word 26 of the Data definition. The order of
values in each logical record is the same as defined by the field entries in the Data
Definition.
It is legal for a file to have zero records; in this case it will contain a data definition only.
It is not legal for a file to have zero fields.

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


5
COMMON FILE TYPES

The following tables detail the types of files recognized by Datamine. Note that in
addition to the fields listed, most of these file types will contain additional "attribute"
fields. For example, a file is recognized as a coordinate string or perimeter file if it
contains the five numeric, explicit fields "XP", "YP", "ZP", "PTN", and "PVALUE".
However, nearly all string files will contain additional fields called "COLOUR",
"LINESTYLE", etc.

Coordinate string or perimeter file

String, perimeter

XP Numeric Explicit

YP Numeric Explicit

ZP Numeric Explicit

PTN Numeric Explicit

PVALUE Numeric Explicit

Plot file

Plot

X Numeric Explicit

Y Numeric Explicit

S1 Numeric Explicit

S2 Numeric Explicit

CODE Numeric Explicit

COLOUR Numeric Explicit

XMIN Numeric Implicit

XMAX Numeric Implicit

YMIN Numeric Implicit

YMAX Numeric Implicit

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


6
Plot

XSCALE Numeric Implicit

YSCALE Numeric Implicit

XORIG Numeric Implicit

YORIG Numeric Implicit

CHARSIZE Numeric Implicit

ASPRATIO Numeric Implicit

Drill hole file

Drill hole

BHID Numeric or Explicit


Alphanumeric

FROM Numeric Implicit or Explicit

TO Numeric Implicit or Explicit

LENGTH Numeric Implicit or Explicit

X Numeric Explicit

Y Numeric Explicit

Z Numeric Explicit

A0 Numeric Implicit or Explicit

B0 Numeric Implicit or Explicit

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


7
Block model file

Block model

IJK Numeric Explicit

XC Numeric Implicit or Explicit

YC Numeric Implicit or Explicit

ZC Numeric Implicit or Explicit

XINC Numeric Implicit or Explicit

YINC Numeric Implicit or Explicit

ZINC Numeric Implicit or Explicit

XMORIG Numeric Implicit

YMORIG Numeric Implicit

ZMORIG Numeric Implicit

NX Numeric Implicit

NY Numeric Implicit

NZ Numeric Implicit

Wireframe triangle file

Wireframe triangle

TRIANGLE Numeric Explicit

PID1 Numeric Explicit

PID2 Numeric Explicit

PID3 Numeric Explicit

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


8
Wireframe points file

Wireframe points

XP Numeric Explicit

YP Numeric Explicit

ZP Numeric Explicit

PID Numeric Explicit

Section Definition file

Section definition

XCENTRE Numeric Explicit

YCENTRE Numeric Explicit

ZCENTRE Numeric Explicit

SDIP Numeric Explicit

SAZI Numeric Explicit

HSIZE Numeric Explicit

VSIZE Numeric Explicit

Catalogue file

Catalogue

'FILENAM Alphanumeric Implicit or Explicit

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


9
Scheduling file

Schedule

BLOCKID Numeric Explicit

VOLUME Numeric Explicit

TONNES Numeric Explicit

DENSITY Numeric Explicit

SLOT Alphanumeric Explicit

PERCENT Numeric Explicit

DRAW Numeric Explicit

START Numeric Explicit

END Numeric Explicit

LENGTH Numeric Explicit

AREA Numeric Explicit

Results file

Results

MODEL Alphanumeric Implicit

BLOCKID Numeric Explicit

DENSITY Numeric Explicit

VOLUME Numeric Explicit

TONNES Numeric Explicit

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


10
Rosette file

Rosette

ROSNUM Numeric Explicit

ROSXPOS Numeric Explicit

ROSYPOS Numeric Explicit

ROSZMIN Numeric Explicit

ROSZMAX Numeric Explicit

ROSAZIM Numeric Explicit

ROSFANG Numeric Explicit

ROSBWID Numeric Explicit

Drive statistics file

Drive statistics

PVALUE Numeric Explicit

VOLUME Numeric Explicit

TONNES Numeric Explicit

LENGTH Numeric Explicit

ZMIN Numeric Explicit

ZMAX Numeric Explicit

GRADIENT Numeric Explicit

XAREA Numeric Explicit

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


11
Point data file

Point data

XPT Numeric Explicit

YPT Numeric Explicit

ZPT Numeric Explicit

Dependency file

Dependency

PNUM1 Numeric Explicit

PNUM2 Numeric Explicit

Plotter pen selection file

Plot pen file

COLOUR Numeric Explicit

PEN Numeric Explicit

Plot filter file

Plot filter file

FIELD Alphanumeric Explicit

TEST Alphanumeric Explicit

IN Numeric Explicit

OUT Numeric Explicit

PEN Numeric Explicit

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


12
Validation file

Validation file

ATTNAME Alphanumeric Explicit

ATTTYPE Alphanumeric Explicit

VALUE Alphanumeric Explicit

MIN Numeric Explicit

MAX Numeric Explicit

DEFAULT Numeric Explicit

#########
 2006 Datamine Corporate Limited. All rights reserved.
The information contained in this document represents the current view of Datamine Corporate Limited on the issues discussed as of the date of
publication. Because DCL must respond to changing market conditions, it should not be interpreted to be a commitment on the part of DCL, and
DCL cannot guarantee the accuracy of any information presented after the date of publication.
This document is for informational purposes only. DCL MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.
Datamine is a registered trademark of Datamine Corporate Limited. Microsoft, Windows and Windows NT are registered trademarks and ActiveX
is a trademark of Microsoft Corporation.

This documentation is confidential and may not be disclosed to third parties


without the prior written permission of Datamine Corporate Limited.

© Datamine Corporate Limited


13

You might also like