Comma Separated File


A Comma Separated File is a delimited text file, which uses a comma to separate values.

SIS Desktop 9.1 can export from the Table Window to this format.

To open a CSV file select the Comma Separated File button.

The File Browser dialog is displayed:

Navigate to the location of the required Locate an *.asc, *.csv, *.tab or *.txt file and click Next.

The Database file dialog will be displayed:

File Type

Delimited/Fixed Width/Code page

Select the file type of the selected file, either Delimited or Fixed Width and then select the Code page used when the file was created or saved.

SIS Desktop 9.1 should have detected these settings, allowing you to proceed without needing to select options.

Skip Lines

These options allow you to select lines that will be skipped for added feedback.

Header

Enter the number of header lines to skip.

Keep first line

Use in conjunction with Header to keep the first line when skipping a number of subsequent lines.

Footer

Enter the number of footer lines to skip.

Regular Expression

Use an expression to skip lines.

For example entering 329 in this example will skip lines 32900 to 32905:

On completion click Next.

The File format dialog will be displayed:

SIS should detect the Field delimiter and Text Qualifiesr of the selected file, if not select the appropriate options. The First Row Contains Field Names tickbox will use the values in the first row as field names rather than data values.

Click Next to display the Database columns dialog:

To change the Name or Type select the corresponding column to activate the Field Options section. Date Format can be changed using the Date option in the Type

Click Next.

The Recordset dialog will be displayed:

Select the table you want to add. You can add all the columns in a table by clicking the Add button while the table is selected in the Database Tables/Columns section. Alternatively you can add specific columns by expanding the table and selecting the individual columns. Any columns in the Selected columns section that are unwanted can be deselected by clicking the Remove button.

The SQL Where is greyed out as SQL cannot be applied to flat files such as CSV or other text file.

Click Next.

The View Points dialog will be displayed:

Note: The X and Y Fields must be set, however the rest of the fields are optional.

Point Configuration

X Field/Y Field

Use the drop-down boxes to select the column to use for X / Y values.

XY Units

Linear

X/Y values use Linear units. This will usually be the case in Orthogonal coordinate reference systems, for example OS National Grid.

When Linear is selected the drop-down box allows you to select from:

m

mm

cm

km

foot

yard

fathom

mile

nautical mile

Angular

X/Y values use Angular units. This will usually be the case in Latitude/Longitude coordinate reference systems.

When Angular is selected the drop-down box allows you to select from:

degrees

radians

DMS

gradians

DM

Note: The value in the drop down tells SIS the format to expect from the datasource. SIS will then convert and display the points in degrees. When selecting DMS be aware that SIS uses a coma as a separator within its coordinates i.e. x,y,z. If your datasource format is DD,MM,SS.S only the DD part will be used, therefore you need to replace the coma with another character such as double-quotes (any character except a coma) to get DMS.

Create 'Empty' Items for unusable coordinates

If this option is selected X Field and Y Field can be left undefined.

Optional Configuration

ID Field

If one of the columns contains unique positive integer values, you can use that column for the _id& property. This can help when writing GISLink customisations or SIS ActiveX applications to coordinate SIS items and other database data.

Z Field

The column to use for Z values, or height above sea-level. If you leave this field empty, then 2D points will be created.

Z Units (linear)

The units of the Z coordinates in the database.

Overlay Configuration

Name

This text box allows you to enter a name to override the overlay name.

Theme

This allows you to add a default theme.

More Properties... button

Click the More Properties... button to display the View Points dialog, which allows you to modify the Coordinate system and Scale. The Feature Table cannot be selected for non-editable files and is greyed out. The Properties... button opens the Cadcorp View Points dialog, which shows the properties of the overlay to be created.

Click Close on the Cadcorp View Points dialog

Click OK on the second View Points dialog.

Click Finish on the main View Points dialog.