CsvGeoPathReader

Description

sealed class Tinman.AddOns.Scenes.CsvGeoPathReader

Full source code is included in the Tinman 3D SDK download.

A IGeoPathReader for GeoPathSample values that parses a text file with comma-separated values (CSV).

This reader reads GeoPathSample values and expects that all GeoPathValues are present in the CSV file. It is intended to be an example for implementing a custom IGeoPathReader. Please have a look at the TableGeoPathReader class, which is the recommended way for reading tabular geo path data.

Public / Constants

Height


public constant Height → (0:int32)

Column for GeoPathSample.Height.

Latitude


public constant Latitude → (1:int32)

Longitude


public constant Longitude → (2:int32)

Pitch


public constant Pitch → (3:int32)

Column for GeoPathSample.Pitch.

Roll


public constant Roll → (4:int32)

Column for GeoPathSample.Roll.

Timestamp


public constant Timestamp → (5:int32)

Yaw


public constant Yaw → (6:int32)

Column for GeoPathSample.Yaw.

Public / Constructors

Csv​Geo​Path​Reader


public constructor CsvGeoPathReader → (2)

csv in : Path

[not-null]
Path to a CSV file that holds the geo path values.

header opt : bool = false

Read header row from csv in file?

Creates a new instance of CsvGeoPathReader.

The default mapping from geo path columns (see Columns) to CSV file columns (see CsvReader.ReadLine) is the following:

where n is the zero-based CSV file column index.

IOException

If an I/O error has occurred.

Public / Methods

Mapping

2 overloads


public method Mapping1 → (2)

column in : int32

[0..CsvGeoPathReader.Columns-1]
The geo path column.

index in : int32

[>=0]
The zero-based column index of the CSV file.

returns → CsvGeoPathReader

this

Specifies the mapping from the given zero-based column index of the CSV file and the geo path column.


public method Mapping2 → (2)

column in : int32

[0..CsvGeoPathReader.Columns-1]
The geo path column.

name in : string

[not-empty]
The column name, as read from the CSV header.

returns → CsvGeoPathReader

this

Specifies the mapping from the given zero-based column index of the CSV file and the geo path column.

IOException

If there is no column of the given name or if the no header row has been read.

Name


[Pure]
public static method Name → (1)

column in : int32

[0..CsvGeoPathReader.Columns-1]
The column index.

returns → string

The column name.

Returns a human-readable name for the given geo path data column.

Transform


public method Transform → (3)

column in : int32

[0..CsvGeoPathReader.Columns-1]
The geo path data column.

offset opt : float64 = 0

The offset coefficient (see remarks).

scale opt : float64 = 1

The scale coefficient (see remarks).

returns → CsvGeoPathReader

this

Specifies a linear transformation for the values that are read from the CSV file.

The linear transformation is defined as follows:

output = input * scale + offset

where input is the value that has been read from the CSV file and output is the value that is returned by IGeoPathReader.ReadSample.