Create Column(s)

ERDAS IMAGINE Help

HGD_Variant
16.6
HGD_Product
ERDAS IMAGINE
HGD_Portfolio_Suite
Producer

Category: Data Generation, Attributes

Function Type: Point (see Operator Types in Spatial Modeler)

  • Description

The Create Column(s) operator adds one or more columns to one or more layers of an Attribute Table taken in by the AttributeTableIn port. A column is defined by a name from the AttributeName port and a Table of values of a single data type, taken in by the AttributeValues port.

You can also specify the data type for the column with the TableType port as well as which layer(s) of the Attribute Table the column will be added to with the LayerNumbers port. By default, the Create Column(s) operator has ports for adding a single column, but you can add more columns by clicking the Add Port button on the Spatial Modeler tab. This adds another set of AttributeName, AttributeValues, LayerNumbers, and TableType ports. The column(s) are added to the input Attribute Table in the order they are specified on the operator (1...N).

If no value is set on the TableType port, the data type for the column added to the Attribute Table will be the data type of the input Table.

If the input Attribute Table has more than one layer, the LayerNumbers port determines which layer(s) of the Attribute Table that column will be added to. The LayerNumbers port takes a Range List that can be set on the port using a Range List operator, or by specifying the value in the Properties pane. The Range List value can be a single integer, a range, or a list of integers separated by commas. If the Attribute Table has more than one layer and no value is set on the LayerNumber port, the column is added to the first layer of the Attribute Table.

If the number of rows in an input Table does not match the number of rows in the input Attribute Table, the Table being added will be expanded or truncated to match the number or rows in the input Attribute Table. If expanded, the added rows will be filled with: 0 for a Table of numeric type, black for a color Table, or an empty String for a String Table.

If no Attribute Table is supplied on the AttributeTableIn port, this operator creates a new Attribute Table that has a single layer and contains the column(s) specified on the operator.

The resulting new or modified Attribute Table is set on the AttributeTableOut port. This Attribute Table can be added to a raster or vector using another operator such as Attach Attributes.

  • Connections

Name

Objects Supported

Required

Default

AttributeTableIn

AttributeTable

AttributeName1...N

String

AttributeValues1...N

Table

LayerNumbers1...N

RangeList

1

TableType1...N

SimpleDataType

Native Type

AttributeTableOut

AttributeTable

  • Related Operators

Attach Attributes

  • Syntax

CreateColumns ( <AttributeName1>, <AttributeValues1>,...[,AttributeTableIn=<AttributeTableIn>][,LayerNumbers1=<LayerNumbers1>][, TableType1=<TableType1>] )

  • Example Model

This example shows how this operator might be used in a larger model.