GeoMedia can read text files (such as the simple CSV file shown in the screenshot below) directly through the Text File Connection.
But before you can connect to the text file, you have tell GeoMedia how the text file is formatted or structured i.e. you have to define the name of the field, the data type of the field, geometry type if any etc. This post describes the steps to create a text file server format using GeoMedia's Define Text File Server Format File Utility.
- On the Windows desktop, select Start > All Programs > GeoMedia > Utilities > Define Text File Server Format File.
The Define Text File Server Format dialog box appears.
- Select File > New.
The New dialog box appears.
- Choose normal.tfd. Click New.
The Define Text File Server Format - File Type Definition dialog box appears.
- Click Browse. Note: we want to see a sample of our text file to help in the definition process.
The TFD Open Text File dialog box appears.
- Browse and select the text file we want to read in GeoMedia, e.g. mytextfile.csv. Click Open.
The text file is previewed in the Text file preview box.
- In the Geometry type drop down list, choose None.
Note: if your text file contains point geometry records, then choose Point. Later you have to define the X and Y geometry fields. In this example, I'll go with no geometry.
- If your text file has a header row, enter 2 in the Start row field to skip the header row.
The Define Text File Server Format - File Type Definition dialog box may look like this at this point.
- Click Next.
The Define Text File Server Format - Delimited Data Definition page appears.
- If the data is comma delimited, toggle on Comma.
- Click Next.
The Define Text File Server Format - Geometry Definition - Points page appears. Note that the first preview column is marked with a check icon.
- In the attribute name field, clear the text "skip" and enter a meaningful name for the field, e.g. id. Click Set attribute definition.
- Click the second column header. In the attribute name field, clear "skip" and enter the field name e.g. Easting. In the attribute data type field, choose Double. Click Set attribute definition.
- Repeat the previous step 12 for the remaining columns, if any.
- Click Finish.
The Message "Do you want to save the changes you made to 'Untitled.tfd'?" appears.
- Click Yes.
- In the File name field, enter a file name. Click Save.
The Text file server format definition is created and can be used when connecting to this text file in GeoMedia.