IGeoPathReader

Description

interface Tinman.Engine.Scenes.Data.IGeoPathReader

Derived from

IDisposable

Extended by

GeoPathReader abstract
IGeoPathReaderGeneric

Base interface for classes that read components of a geo path from a tabular data source, where columns map to geo path components and rows map to geo path samples.

The process for reading geo path components is structured as follows:

  1. Choose a suitable implementation class for reading the format of the data source at hand and create a IGeoPathReader object.

  2. Call Component to register the geo path components to consume.

  3. Use GeoPathReaderComponent.Column1 or GeoPathReaderComponent.Column2 to map geo path components to data source columns.

  4. Optionally use GeoPathReaderComponent.Value to specify default values for unmapped geo path components or a linear value transformation.

  5. Optionally use IGeoPathReaderGeneric.Vertical to configure a conversion to apply to the vertical coordinates that are read from the data source.

  6. Use ReadComponents to read plain geo path components or IGeoPathReaderGeneric.ReadSample to read geo path samples of a specific type. Alternatively, use any of the ReadAll* helper methods.

Public / Methods

Column​Index


public method ColumnIndex → (1)

name in : string

The data source column name.

returns → int32

The data source column index or -1 iff not found.

Returns the index of the given data source column.

Column​Name


public method ColumnName → (1)

column in : int32

The data source column index.

returns → string

The data source column name or null iff column in is negative or greater than or equal to Columns.

Returns the name of the given data source column.

Component


public method Component → (1)

component in : GeoPathComponentId

The geo path component to register. If equal to GeoPathComponentId.None, this method returns silently, without registering a new geo path component.

returns → GeoPathReaderComponent

The GeoPathReaderComponent that is associated with the registered geo path component in. Will be null iff component in is GeoPathComponentId.None.

Registers the given geo path component.

If possible, the given geo path component in identifier will be merged with an existing identifier (see GeoPathComponentId.Merge), so that the reader always uses identifiers that are most specific, with respect to their special "any" field values. This also ensures that the same GeoPathReaderComponent object is returned for mergeable identifiers.

Component​Id


public method ComponentId → (1)

component in : int32

[0..IGeoPathReader.Components-1]
The geo path component index.

returns → GeoPathComponentId

The geo path component identifier.

Returns the identifier of the given geo path component.

This method accesses the list of identifiers, which is sorted by the natural order of GeoPathComponentId values. So the order in which the calls to Component are made is irrelevant, it does not influence the order of the list elements. Consequently, each time Component is called, the order of the list elements may change.

Read​Components


public method ReadComponents → (2)

values in : float64 [ ] [ ]

[not-null]
The geo path component array to use for output, see IGeoPathReader.ValueArrays.

opt : int32 = 0

[>=0]
Index of element in values in to read.

returns → bool

true if values in has been written to,
false if there are no more geo path component tuples.

Reads the next tuple of geo path components.

The given values in array will be written to as follows:

values[idx][n] := value

where idx is the geo path component index (see Components) and value is the component value that has been read from the mapped data source column.

IOException

If an I/O error has occurred.

Public / Attributes

Columns


public attribute Columns → (get)

value : int32

[>=0]
The number of data source columns.

Returns the number of data source columns.

Components


public attribute Components → (get)

value : int32

[>=0]
The number of geo path components.

Returns the number of registered geo path components.

Extensions

As​Geo


[OwnerReturn] [OwnerThis]
public static method AsGeo → ()

Uses GeoPathSampleTrait to create a IGeoPathReaderGeneric object that wraps this reader and reads GeoPathSample values.

This method delegates to GeoPathReaderGeneric.Wrap.

As​Ground


[OwnerReturn] [OwnerThis]
public static method AsGround → ()

Uses GroundPathSampleTrait to create a IGeoPathReaderGeneric object that wraps this reader and reads GroundPathSample values.

This method delegates to GeoPathReaderGeneric.Wrap.

Component


public static method Component → (1)

component in : GeoPathValue

The well-known geo path value to register.

returns → GeoPathReaderComponent

The resulting GeoPathReaderComponent or null iff component in is GeoPathValue.None.

Calls GeoPathComponentId.For3 and then delegates to IGeoPathReader.Component.

Component​Index


[Pure]
public static method ComponentIndex → (1)

component in : GeoPathComponentId

The geo path component identifier to match against the registered ones.

returns → int32

The index of the matching geo path component (see IGeoPathReader.Components) or -1 if not found.

Returns the geo path component index for the given identifier.

Read​All​Components


[OwnerThis]
public static method ReadAllComponents → ()

returns → GeoPathComponents

The read path samples.

Reads all remaining path samples into a GeoPathComponents container.

IOException

If an I/O error has occurred.

Value​Arrays


public static method ValueArrays → (1)

count opt : int32 = -1

The size of each value array or negative to leave null.

returns → float64 [ ] [ ]

The nested geo path sample value arrays.

Creates nested geo path value arrays for use with IGeoPathReader.ReadComponents.