This is an old revision of the document!
Type System
Overview
Every port has a type, and a port accepts data of its exact type, or any other type for which an automatic conversion to that type has been registered. Each type in this system is implemented by a dedicated type class, named after the data it represents with a Type suffix — for instance, Region Manager Type is the type class backing the region manager data. This page refers to every type by that full class name and links each one to its own page.
See Ports on the EGO Script page for how a port's type governs what it can receive, and Basic Data Flow for the general rule this page's conversions follow.
How automatic conversion works
Automatic type conversion only happens when a value is connected from one port to another — a variable reference, or a functor call inlined directly into an argument. It never applies to a constant written directly into a port; a constant is instead parsed by the receiving port's own type-specific literal syntax, which accepts only that type's own literal form. See Constants for this rule in full.
Conditional conversions. A handful of conversions only succeed if the source value actually holds data compatible with the target type at runtime, raising an error otherwise — converting an already-typed, known value never fails, but converting a generic holder type (such as Table Value Type) does depend on what it actually contains. Table Value Type → String Type and Table Value Type → Real Value Type are the clearest examples: each only succeeds if the Table Value Type value actually holds that type. Wrapping such a conversion in Skip On Error turns the failure into a type test — see Manipulating Tables and Lookup Tables for a full worked example of this pattern. The same conditional logic governs every type that converts to or from Table Type itself — see Table format of table-shaped types below for the exact column layout each one expects.
Sequencing. A conversion to None Type is registered for almost every type in the system. This isn't meant to transform data — it's the standard way to force an execution order between two functors that otherwise share no data dependency: connecting an output to a None Type-typed input creates a dependency edge without needing the value itself, so the engine schedules the connected functor to run after the one that produced it. The types that support this are listed separately in Sequencing below, rather than repeated in every table.
Value types
Filename and text types
Table and Lookup Table types
Map and raster types
Simulation types
Calibration types
Table format of table-shaped types
Several of the types above are really Table Type (or Lookup Table Type) under one particular, expected column layout: converting to Table Type keeps the same rows but drops the type's special meaning, and converting from Table Type checks that the table actually has this shape — the same conditional-conversion pattern described above. The engine registers an exact default format for most of these; key columns are marked * the way Table Type itself marks them.
| Type | Direction | Table format |
|---|---|---|
| Lookup Table Type | ↔ Table Type | Key* (Real), Value (Real) |
| Categorization Type | ↔ Table Type | Value* (Real), Name (String), Color_Red (Real), Color_Green (Real), Color_Blue (Real) |
| Change Matrix Type | ↔ Table Type | From* (Real), To* (Real), Cells (Real) |
| Percent Matrix Type | ↔ Table Type | From* (Real), To* (Real), Percent (Real) |
| Transition Matrix Type | ↔ Table Type | From* (Real), To* (Real), Rate (Real) |
| Transition Function Parameter Matrix Type | ↔ Table Type | From* (Real), To* (Real), Mean_Patch_Size (Real), Patch_Size_Variance (Real), Patch_Isometry (Real) |
| Neighborhood Table Type | ↔ Table Type | Neighbor1* (Real), Neighbor2* (Real), Weight (Real) |
| Weights Type | ↔ Table Type | From* (Real), To* (Real), Variable* (String), Range_Lower_Limit* (Real), Range_Upper_Limit* (Real), Weight (Real) |
| Weights Of Evidence Skeleton Type | ↔ Table Type | No default format registered alongside the others — shape not confirmed. |
| Base Table Type | → Table Type only | Generic container, not a fixed shape — accepts anything already shaped like Table Type or Lookup Table Type. No conversion back from Table Type to Base Table Type is registered. |
| Lookup Table Group Type | ↔ Table Type | Generic collection of Lookup Table Type values, not a single fixed shape. |
Note: Transition Set Type is left out of this table on purpose — it converts one-way from Lookup Table Type but never to or from Table Type directly, so it has no registered table format either.
Region types
Region Manager Type has no automatic conversions to or from any other type — the only conversion registered for it is the sequencing conversion to None Type described below.
Sequencing
A conversion to None Type — used to force an execution order between two functors rather than to transform a value — is registered for the following types:
Connection Info Type, Boolean Value Type, Code Type, Date Type, Enum Type, Folder Type, Generic Filename Type, Image Expression Type, Index Or Name Type, Int Set Type, Integer Value Type, Log Tag Type, Name Type, Non Negative Integer Value Type, Null Value Type, Percent Type, Positive Integer Value Type, Real Value Type, String Type, Struct Type, Workdir Type, Categorical Map Type, Categorization Type, Cell Type, Kml Type, Kml Timeline Type, Kmz Filename Type, Map Type, Map Filename Type, Projection Type, Weights Of Evidence Skeleton Type, Change Matrix Type, Neighborhood Table Type, Percent Matrix Type, Transition Function Parameter Matrix Type, Transition Matrix Type, Transition Set Type, Weights Type, Weights Filename Type, Elevation Graph Type, Region Manager Type, Base Table Type, Lookup Table Type, Lookup Table Filename Type, Lookup Table Group Type, Table Filename Type, Table Type, Table Manager Type, Table Value Type, Tuple Type
See also
- EGO Script — ports, constants, and where automatic conversion applies
- Basic Data Flow — the general connection/constant distinction
- Manipulating Tables and Lookup Tables — worked example of a conditional conversion used as a type test
- Table format of table-shaped types — the exact column layout each table-shaped type expects
- Map Type and Lookup Table Type — the shapes these types accept