XPAC Reference Guide

Importing spatial data from a delimited file

Importing spatial data from a delimited file

Previous topic Next topic  

Importing spatial data from a delimited file

Previous topic Next topic  

In addition to other mining data sources, you can also import spatial data in the form of polygons. Importing spatial data lets you visualise and evaluate your mine design and schedule using spatial data plots.

Note

To ensure a successful polygon import, you will need to follow the polygon file import rules.

To import spatial data from a delimited file:

1.If you want to import spatial data to a database section other than the deposit (for example, a dump), select the level 0 record in the Main database structure tree. For example:

Importing into other Main database sections

2.Select File > Import > Spatial Data. The Select Spatial Data Set window displays.
3.Either:
a.Overwrite an existing data set:
i.Select a data set from the drop-down list.
ii.Click OK.
b.Create a new spatial data set:
i.Type a name for the new data set that you want to create. A confirmation displays.
ii.Click Yes.
4.In the Import Spatial Data window, select Delimited Or Fixed Width (.csv / .txt).
5.Click Next. A Windows Explorer window displays.
6.Navigate to the folder containing the CSV file that you want to import.
7.Select the file and click Open. If you selected a file that contains a file header, XPAC will attempt to read it (see Polygon file import header for more information). The Polygon Import Template Setup - Step 1 window displays.

Note

If you want to use settings that you previously saved, you can load a settings template. If you use a template, you will not need to complete the remaining steps.

8.Complete the settings for step 1:
a.In the File Data Type section, select Delimited and review the data in the File Preview pane. If the data is unreadable, you may need to import a fixed width file instead.
b.If required, deselect the Ignore lines with control characters check box if you want XPAC to ignore control characters during the import process (for example, control characters may exist in the file to indicate page feeds). Otherwise, if XPAC displays an error message if control characters exist in the file.
c.Type the Comment line character that is used in the file to indicate comments, for example, !. XPAC will ignore any comments in the file during the import process (see File header for more information).
d.Specify the Number of fields per item that you want XPAC to read for each point of the polygons (includes record identifiers).
e.Review the data that displays in the File Preview section.
f.Click Next. The Polygon Import Template Setup - Step 2 window displays.
9.Complete the settings for step 2:
a.In the Delimiters section, select the check box of each character that you want to use to separate data in the file.

Note

If you select Other, you also need to specify the character that you want to use, for example, !.

b.If required, select the Treat consecutive delimiters as one check box.
c.Specify the Text Qualifier that you want to use to determine if an item of data is a text string. Either:
i.Select a value from the drop-down list; or
ii.Type a value in the field.
d.Review the data that displays in the File Preview section.
e.Click Next. The Polygon Import Template Setup - Step 3 window displays.
10.Complete the settings for step 3. Either:
a.Use the Field Setup Wizard to help you set up data fields; or
b.Manually set up data fields.
11.Review the data that displays in the File Preview section.
12.Click Finish.

XPAC imports the spatial data as specified.

Information

If any errors occur during the import process, the Event Log will display the details of the failure.

Polygon import file header

If you import a file that was previously used in XPAC version 7, then it may contain an XPAC file header. This data contains information about how the polygon data is formatted in the file, for example:

Polygon Import File Header

If the file that you are importing contains a file header, XPAC will attempt to read and interpret the data. On successful processing, XPAC displays a confirmation message. The Polygon Import Template Setup - Step 1 window then contains the options as specified by the file. You can change these options as required.

However, if you are importing a file without a file header, then the Polygon Import Template Setup - Step 1 window displays the default values for each field.

Manually setting up data fields

If required, instead of using the Field Setup Wizard, you can manually set up data fields.

1.Specify the Number of fields per record. This controls the maximum number of rows in the data sheet.
2.For each row in the data sheet, select the Field Type. For example you can select:
Ignore if you do not want to write the field in XPAC.
PIL Number to specify a record position in level at the database level you define in the Field Attribute field.
Record Name to specify a record name that you specify in the Field Attribute field.
X Co-ordinate, Y Co-ordinate or Z Co-ordinate if the field is a coordinate for a polygon point. Typically, the X represents the Easting, Y the Northing and Z the elevation. The coordinates are assigned to the record defined by the record identifiers and the specified activity.
Activity Name or Activity Number to specify the productive activity. If you do not select an activity, XPAC imports it to the default activity.
3.If required, select the Field Attribute for each row in the data sheet, for example, if you selected PIL Number or Record Name.

Information

You can click Clear All at any time to clear all data in the data sheet.