ILWIS objects

 

Columns    

 

 

A column is a data objects that is part of a table; a column can be used to store attributes, results of calculations, results of operations, etc. Fields in a column may contain class names, IDs, values, X- and Y-coordinates, colors, text, etc.; this is determined by the domain of the column.

Columns are displayed and edited in a table window. You can calculate with columns by typing a Table Calculation formula on the command line of a table window. For more complicated calculations, you can use the Columns menu in the table window.

For more information on the domain of a table and the structure of a table, see ILWIS objects : tables.

Contents of columns:

The contents of a column is defined by the domain that the column is using. For each new column that you add to a table, you have to select (or create) a domain which fits the kind of data you want to store in that column, similar to the selection or creation of a domain when you make a new map. In a Soil table for example, you can select the system String domain for a column Description that should store descriptions of soil types, and you can select the system Value domain or create your own value domain pH for a column pH that should store pH values.

When calculating with columns, it is normally enough to select system domain Value or one of the other system domains. You only have to create a new value domain, if the column will contain values that have a special 'standardized' meaning.

A column may store for example:

For more information on domains, refer to Basic concepts : working with domains.

The domain of a column may have a representation. This may be useful if the table is an attribute table; when displaying a map, you can directly display the map by an attribute column, thus without physically creating an attribute map. To display a map by attribute, select the Attribute check box in the Display Options dialog box which appears when opening the map.

Types of columns:

Source columns:

Normal editable columns.

Dependent columns:

Columns that store the result of a calculation: ColumnCalculate, ColumnJoin, ColumnAggregate, ColumnCumulative, ColumnLeastSquares.

Table-owned columns:

Columns that are part of a dependent table and store the results of an operation e.g. output columns of the Histogram and Cross operation, and other statistical operations.

Also objects that internally use a table for storage (point maps; class, ID and picture domains; class representations; georeference tipeoints) and which thus can be opened as a table have table-owned columns.

To protect the results of calculations or operations, fields of dependent columns and table-owned columns in a dependent table are not editable unless you break the dependency links of the dependent column or unless you break the dependency links of the dependent table.

Names of columns:

In ILWIS 3, object names comply with Windows long file names. Also Universal Naming Convention (UNC) paths are supported. For more information, see How to use long object names.

To create a column:

An easy way to add a new column to a table is to open the Columns menu and select the Add Column command. In the appearing Add Column dialog box, enter a name and description for the column and select or create a domain. For other create methods, see How to add a column to a table. Columns added in this way are always source columns, i.e. editable columns. Even if you use such a column later on as the output column of a calculation, the column remains a source column.

You can also directly add a new column to a table by typing a Table Calculation formula on the command line of the table window which contains a new column name, or by using the Columns menu to join columns from another table, to perform aggregations or to calculate cumulative sums of columns or perform a least squares fit.

New columns created by typing a TabCalc formula on the command line in which you use an equal symbol (=) are dependent columns. Columns that contain the result of a join, aggregation, cumulative sum or least squares fit obtained through a dialog box are also dependent columns. When you use the assignment symbol (:=) in a TabCalc formula, the new column is an editable source column.

You may add as many columns to a table as you like. To change the order and width of columns or to sort the records of a table, see Table window : functionality.

To edit fields of a column:

When a table is displayed in a table window, you can edit the fields of source columns directly both in the table viewer and in record view. First select a field in the table, then type a new value of ID when the column uses a value or identifier domain, or open the drop-down list box of the field and then select a class name from the drop-down list box when the column uses a class domain. For more information, see How to edit a table.

Fields in dependent columns are not editable unless you break the dependency link of the column; you can do this in the Properties dialog box of the column. Further, fields in table-owned columns in dependent tables are not editable unless you break the dependency links of the table; you can do this in the Properties dialog box of the table. However, the fields in table-owned columns in objects that are internally stored as a table and that can be opened as a table (e.g. point maps and class representations), can usually be edited.

Operations on columns:

Mostly, you will calculate with columns using the operators and functions that are available in Table Calculation. You can type your table calculation formulae on the command line of a table window. When you use the definition symbol = in a TabCalc formula that contains a new column name, a dependent column is created. For more information, see also Basic concepts : dependent data objects and Table Calculation.

When you use the assignment symbol := in a Table Calculation formula, a source column is created.

Further, you can use the Columns menu to join, aggregate, calculate a cumulative sum or a least squares fit. Subsequently, fill out the appearing dialog box of that column operation and click the OK button; this generates an expression on the command line of the table window. Output columns that are obtained through an operation's dialog box are always dependent. Advanced users can type these complete expressions on the command line of a table window, or ILWIS expressions on the command line of the Main window or create a script to execute a series of expressions.

Lastly, the columns of a dependent table in which the results are stored of an operation such as the Histogram operation or statistical operations on maps are table-owned columns. For more information, refer to the Histogram operation, etc.

When calculating with columns and you want to store values in a column, you can usually select the system domain Value, and specify value range and precision, see below.

Technical information:

Columns have no object definition file of their own. All necessary information to display, edit and calculate with columns is stored in the object definition file of the table (.TBT) to which the column belongs. Column data is stored in the binary file of the table (.TB#).

Each column has a domain, which is a property of a column. By viewing the properties of a column, you can see whether the column is dependent or not, which domain the column is using and in case of dependent columns which other columns the column is using, etc. For dependent columns, you can also manage dependencies: break dependencies, make dependent columns up-to-date, delete a dependent column's data file, etc. For more information, see Basic concepts : properties of objects and How to view the properties of objects.

Columns are stored as bit, byte, 2-byte, 4-byte or 8-byte columns. The store type of a column is primarily defined by the domain that the column is using. For value columns this is determined by the value range and precision that you specify for the output column during a calculation or operation. Usually, ILWIS will come up with defaults, but you can adjust these values. Choosing a wide value range and a very small precision results in a large data file on disk as more bytes are needed to store the column values.

Limitations:

In principle, the maximum number of columns in a table is 32000 and the maximum number of records in a table is 2 billion. In practice however, limitations will occur by available memory. Furthermore, ILWIS is not designed to work with very large data sets: to speed up processing you may need to split tables into smaller logical parts.

See also: