Navigation: Sharing Data >

Using File Headers

 

 

 

 

Some file formats, like CSV, use file headers to define the data in the file.  Beginning with TPC 2023 R1 (July 2023), TPC provides additional support for these file headers.


What a Header Looks Like

This example is the header found in emlid (CSV) GNSS data files.

The first line is the header and identifies the first column as the point Name, the second column as the point Code, etc.

Name,Code,Easting,Northing,Elevation,Description,Longitude,Latitude,Ellipsoidal height

501,,,,,Set Spike 2/28/23,-122.94333368,46.34807044,19.741

502,,,,,"Fnd 2/28/23 5/8"" RC ""35713"" ag",-122.94348955,46.34922481,17.088


Exact Match for Header Words

Unless otherwise noted, headers must match exactly and are case sensitive.

So in the example above, the header word Easting will not match the works East or EASTING.


Ignoring / Skipping Headers

In the ASCII Import settings dialog shown here, the user has chosen to skip the header line which is the first line in the file.

If you imported a file with a header and the header text shown in the dialog doesn't exactly match the header in the file, you can manually specify the format and ignore the header, resulting in the data being imported properly.

In the Import and Export dialogs, you can use the Preview button to see what is in the file, allowing you to determine how many lines you need to skip.


Reading Headers From Files

The example shown in this dialog is for an emlid (CSV) file with GNSS data.  These files contain 28 or more columns of data, defined by their headers.

If you were to enter the import Format wrong, the import wouldn't work and your data would import incorrectly or may not at all.

In this case, turn on [x] Get format from header.  When TPC imports an emlid file, it will determine the correct Format from the header line, using the header words shown in the dialog, like Easting for the X value of a point.


Predefined Headers

Some filters that TPC supports, have their own predefined headers.  Examples of these include Bad Elf and emlid GNSS CSV files.


Editing Headers

Some headers allow you to edit them right inside TPC, replacing TPC's default header name with your own.  See Editing File Headers.


Managing Header Definitions

If you need to edit your header definitions before they work properly, you may also want to save that definition for later use or to let someone else in your organization you it.  You can do this in TPC.   See Managing Header Definitions.


Special Characters

The \ newline and ? unknown characters are special characters that help you work with CSV files.

\ newline

One of the rules for CSV files and many ASCII text files is that each line of the file is another, unique object of whatever is stored in that file.  Those files have an end of line character that tells who ever is reading the file to drop down to the next line for the next unique object in the file.

? unknown

If you find data in your file for which TPC does not yet have a corresponding code, simply use the ? character to tell TPC that data is unknown.  TPC still reads the data, but doesn't try to process it.


Related Topics

Importing Survey Data
Exporting Data
Managing Header Definitions
Editing File Headers
Bad Elf
emlid
Import and Export dialogs
 

 

 

 

Copyright © 2023 Traverse PC, Inc.