You are here: Menu Commands > Block model > Estimation > Text file
GEOVIA Surpac

Import text file

This function allows you to import block-centroid based data from a text file directly into the current block model. Each line of the input file must contain one point (with x, y and z coordinates). The block that this point falls in will be calculated, and the specified attributes for this block filled from the data. This function is useful for importing data dumped to a text file from another block model.

Prerequisites:

The attributes that you want to fill must already exist in the block model. If they do not exist, you must create them for BM IMPORT CENTROIDS to work.

To run this function: Choose Block model > Block model > Import > Text file, or Block model > Estimation > Import text file, or...

  • In the Function Chooser, type BM IMPORT CENTROIDS, and press ENTER.

Text file name

Specify the name of the text file from which the data will be loaded.

Number of header lines

Specify the number of lines at the top of the file which you wish to ignore. If you are loading from a Surpac string file, you will probably want to enter 2 to ignore the header and axis records.

Comment characters

Lines which begin with any character listed in this field will be ignored. If you are loading from a Surpac string file, you will probably want to enter a zero (0) in this field, so that the segment, string and string file records will be ignored.

Delimited?

Enter 'Y' if the file is delimited (eg. with commas between each column) or 'N' if the file is a fixed format file.

Delimiter

Specify the character which separates each column of data in the text file. If you are loading from a Surpac string file, this will be a comma (,).

Target block size

Enter the length of the target block in X, Y and Z directions (the number of minimum sub-blocks in each direction). This virtual block is the block which will be informed by each data point.

The default value is the user block size.

It is important that the dimensions of the target block closely match the dimensions of the blocks being input from the file. For example, if you are loading centroids from blocks which are 4x4x4 minimum sub-blocks in size, but specify a target block of 1x1x1 minimum sub-blocks, the following block model will result:

where each red block has been informed, but no points fell in the white blocks.

If on the other hand, you specify a target block which is larger than the blocks you are loading, then the following will result:

For example, loading centroids from blocks which are 1x1x1 minimum sub-blocks in size, but specifing a target block of 4x4x4 minimum sub-blocks.

  • each target block will be informed 64 (4x4x4) times.
  • each target block will contain only the first (or last) data point that informed it.
  • the data may load slowly. If the 4x4x4 blocks are sub-blocked, then the load will be very slow as each input datum is infoming multiple blocks. For example, if the (4x4x4) target block is completely sub-blocked, it will contain 64 minimum sub-blocks and every one of these blocks will need to be informed when an input datum falls inside the 4x4x4 block.

For these reasons, it is best if the input file contains data which is evenly spaced at the target block dimensions. If the data you are importing contains centroids from block with various dimensions, it is recommended that these data be split into files containing equally sized blocks.

Point count attribute

Specify a block model attribute to record the number of data points which fell in each block during loading. Leave this field blank if you do not want to record the number of data points.

Multiple points

In the case where more than one data point falls in a block, specify whether the first or last data point is to be used to inform the block.

Log file name

Specify the name of the log file to be produced. Leave the field blank if you do not wish to create a log file.

The file will have the following format:

Importing centroids . . : 27-Oct-97
Model . . . . . . . . . : omega3a.mdl
Input file. . . . . . . : 41.str
Number of header lines. : 2
Comment characters. . . : '#'
Delimited . . . . . . . : Yes
Delimiter . . . . . . . : ,
Point count attribute . : None
Multiple points action. : Use last
Target block size . . . : 16 minimum sub-blocks (40.000, 80.000, 80.000)

Column : 1 -> X
Column : 2 -> Y
Column : 3 -> Z
Column : 4 -> Attribute : ore_class

Rejected columns will be reported here

0 rows loaded, 7 rows rejected, 2 rows ignored.

Errors reported

The maximum number of errors to be written to the log file (leave blank to report all errors).

Constrain data?

Enter 'Y' if you wish to restrict data selection or 'N' for unconstrained selection. See Make Constraint. Each input point will be tested to determine whether it falls inside the specified constraint. If it does, then the centroid will be loaded, otherwise an error will be reported to the log file.

Choose Apply to display one of the DEFINE ATTRIBUTES forms or Cancel to return to the BLOCK MODELLING menu. The process may be interrupted by pressing the ABORT key.

Delimited input

If you specified a delimited input file, then the DEFINE ATTRIBUTES form will contain the first few lines of data from the input file.

Define attributes for delimited file

Specify an attribute for each column of data which you wish to load into the block model. You must specify columns for the x, y and z coordinates, as well as at least one block model attribute. The columns for which you do not specify an attribute will be ignored.

Choose Apply to proceed with loading the data, or Cancel to return to the previous form.

Fixed format input

If you specified a fixed format input file, then the DEFINE ATTRIBUTES form will display a small section of the import file with the first two lines displayed as a ruler to aid in counting the column positions across the file.

Attribute

Specify an attribute for each column of data which you wish to load into the block model. You must specify columns for the x, y and z coordinates, as well as at least one block model attribute. The columns for which you do not specify an attribute will be ignored.

From

Specify the starting column for the nominated coordinate or attribute value.

To

Specify the ending column for the nominated coordinate or attribute value.

Choose Apply to proceed with loading the data, or Cancel to return to the previous form.

Messages

You must select a model first
You have attempted to use this function without a current model. Use BLOCK MODELLING Graphics or MODEL Select Model to select a model.

You have specified more than one column for attribute_name
You have selected the named attribute for more than one column.

You have not specified columns for X, Y and Z
You must specify the columns which contain the x, y and z coordinates of each data point.

No attribute has been selected
You must specify at least one block model attribute which is to be loaded from the input file.

Error opening file file name
Either the input file could not be opened, in which case the function will end, or the log file could not be opened, in which case the function will continue without producing a log file.

To column cannot be less than From column (Row #)
The specified row has a To column >from which="" is="" not="" allowed=""