Import Level Data Using a Custom Importer
You can use the Import Format Editor to create a custom importer that will allow you to import level data records contained in an ASCII data file.
Note: To import level data collected with a Trimble DiNi level, see Import Trimble DiNi Level Files. To import level data collected with a Spectra Geospatial Focus DL-15 level, see Import Spectra Geospatial Focus DL-15 Files. To manually key in level data, see Work with Keyed-In Level Data.
To create a custom importer to import level data:
- Select Import Format Editor.
- In the Import Format Editor, do either of the following:
- If you want to base the new importer definition on an existing definition, select the definition and click the Copy button. Then rename the definition and click Next. Use the following steps as a guideline for editing the copied definition as necessary.
- If you want to create a new importer definition, click the New button and enter a name for the new definition. Then click Next.
- On the Description and Search Type screen optionally enter a description for the definition and select the record format type that matches the record format type in the import file. Then click Next.
For additional instructions on using this screen, see Description and Search Type Options.
- On the Select General Properties screen, do the following:
- Select Level data in the Store data as drop-down list.
- Ensure the Show editor on import check box is checked.
This specifies that the Import Format Editor displays when it is used to import a data file, allowing you to verify the importer properties and test it with your import file before performing the import.
- Check the Variable row-type definitions check box if you want to specify that a row’s format and supported level data is determined by a row-type field in the record.
This allows different types of data records to be included in the same level import file. For example, based on the row-type definition, some rows might be formatted to contain elevation data while other rows are formatted to contain observation data.
- Complete the other fields as appropriate.
The Coordinate quality drop-down list allows you to specify the coordinate quality for imported points that assign a benchmark elevation.
For additional instructions on using this screen, see General Properties Options.
- Click Next.
- On the Fields screen, use the Fields drop-down list to add fields to the data record layout to match the record layout in the import file. Enter properties for each field you add as necessary.
Note the following:
- If you checked the Variable row-type definitions check box on the Select General Properties screen, the Row Type field is automatically added to the row and is displayed on the Fields screen.
Enter a Description that identifies the type of level data supported in the row, and a Code that uniquely identifies the row type. If you selected Delimited as the record format type in step 3, in the Optional Field Delimiter drop-down list you can select a delimiter other than the default delimiter (see step 3) to follow the Row Type field. Add additional fields to the row as necessary, specifying a different field delimiter when needed. When you are done adding fields to the new row, click the New button to create additional rows for other row types that might be included in the import data file.
The importer will process each row based on its unique row type code.
Note: If your custom importer definition includes more than one row type, you cannot edit it by de-selecting the Variable row type definitions check box on the Select General Properties screen (see step 4). You must delete all but one of the row types before de-selecting the check box.
- When you add a field to the record, other fields may no longer be available for selection because they are mutually exclusive.
- To move a field in the record (to match the import record), click and drag the tab to a new location.
- If you want TBC to ignore (not import) data contained in a specific field in the import record (for example, there is no corresponding data stored in TBC), insert the Skip field at that location in the record.
- If the field type includes a Multiply on import drop-down list, you can select the value by which the imported value will be multiplied to correctly position the decimal point.
- If the field type includes a Remove leading character in import check box, you can specify a leading character contained in the field that you do not want to import into your project. If the character repeats multiple times in sequence at the beginning of the field, all instances in the sequence will be removed from the import. For example, if you specify 0 as the lead character to remove from a PointID field, a value such as 000000000000P011 would be imported as P011.
- If you selected Fixed Width as the record format type in step 3, you must also specify the width for each field in the record.
- If you selected Search for Text as the record format type in step 3, you must also specify the start and end text for each field in the record.
- If you selected Regular Expression as the record format type in step 3, after you add the necessary fields to the record, select Next and enter the regular expression to use. For additional instructions, see Regular Expressions.
- If you checked the Variable row-type definitions check box on the Select General Properties screen, the Row Type field is automatically added to the row and is displayed on the Fields screen.
- When you are done adding fields to the data record layout, you can optionally test the import definition by clicking the Test button and then selecting the file you want to test.
The File View located at the bottom of the screen displays the contents of the file selected for import. The Import Preview shows how the data will be formatted when it is imported into TBC. To specify the number of rows from the selected data file to display in the two views, click the drop-down button displayed alongside the Read File button and make your selection. Or, use the drop-down to select to open the file in a text editor.
- When you are ready, click Finish.
The new custom importer is ready for use. When you import a level data file that matches the custom importer, the Import Format Editor displays, allowing you to view the importer properties, test the file, and import that data.
To import level data using a custom importer:
- Select Import in Home > Data Exchange to display the Importcommand pane.
- Do one of the following:
- Select the folder containing the level data file in the Import Folder drop-down list.
- Click the Browse icon to browse to the folder containing the level data file.
The files contained in the selected folder display in the Select File(s) area.
- Select the level data file(s) you want to import.
- Optionally, change the layer on which to display the imported level data in the Settings section of the command pane.
- Click Import.
The Import Format Editor displays showing the custom importer definition <ProductAbbrev) has selected to perform the import based on the record layout in the import file. If you want to use a different importer for the data file, select it now.
The File View located at the bottom of the dialog displays the contents of the file selected for import. The Import Preview shows how the data will be formatted when it is imported into TBC. To specify the number of rows from the data file to display in the two views, click the drop-down button displayed alongside the Read File button and make your selection. Or, use the drop-down to select to open the data file in a text editor.
- Click the Import button.
The Level Editor displays, allowing you to further examine and edit the level data before importing it into your project. For instructions on using the Level Editor, see the "To get started" section of View and Edit Level Data.
After the import is complete, you can select Home > Reports > Level Report to view complete information about the imported level data, including raw observations, reduced observations, and reduced coordinates.