IGeoPathBase

Description

interface Tinman.Engine.Scenes.Data.IGeoPathBase

Derived from

ITimestampRangeProvider

Extended by

IGeoPath

Base interface for geo paths, without a generic type parameter for the geo path sample type.

The timestamp range of a geo path without any samples defaults to RangeD.Zero. Otherwise, the timestamp range tightly wraps the timestamp values of the geo path samples.

See also

IGeoPath

Public / Methods

Adjust​To​Ground


[Pure]
public method AdjustToGround → (6)

geocentric in : Geocentric

[not-null]
The geocentric transformation to use.

height in : RangeD

The height above ground coefficients, in geocentric units:
RangeD.Start defines the minimum height above ground of the resulting geo path.
RangeD.End defines the height above ground at which to start blending from the original path sample to the ground sample.
Set to RangeD.Pos to put all geo path samples to RangeD.Start.

keep in : RangeD

Geo path samples with a timestamp (see GeoPathSample.Timestamp) in this range are not processed: the original sample is simply copied to the resulting path.

velocity in : float64

Geo path samples with a velocity greater than or equal to this value (in geocentric units per second) are not processed: the original sample is simply copied to the resulting path.

groundStart opt : bool = true

Is the geo path supposed to be on the ground at the start?

groundEnd opt : bool = true

Is the geo path supposed to be on the ground at the end?

returns → IGeoPathBase

The resulting geo path, which can safely be cast to IGeoPath, iff implemented by this geo path.

Adjusts this IGeoPathBase so that its non-airborne parts align with the terrain surface.

First, the samples of this geo path are converted to ground samples:

Then, a blend factor is computed for each geo path sample: 0 means that the ground sample will be used in the resulting path, 1 means that the original sample will be used. The blend factor is computed as follows:

ground.Height = surface + height.Start
ground.Pitch  = 0
ground.Roll   = 0
factor        = clamp((original.Height - ground.Height) / height.Length, 0, 1)

where ground is the ground sample, initialized with the values of the original sample, surface is the ellipsoid height of the terrain surface, original is the original sample.
Finally, the original sample and ground samples are blend using the computed factor, and the resulting sample is written to the output geo path.

See also

Geocentric.Unit

Geo​Path​Sample​At


[Pure]
public method GeoPathSampleAt → (3)

index in : int32

[0..IGeoPathBase.Count-1]
The path sample index.

geocentric opt : Geocentric = null

The geocentric frame to use. If null, Vertical must be GeoPathValue.Ellipsoid, otherwise GeoPathSample.Height will always be zero. If not null, GeoPathSample.Height will be computed automatically, if necessary.

invariant opt : bool = true

true to use VerticalType.Height,
false to use VerticalType.HeightMesh.

returns → GeoPathSample

The path sample.

Returns the path sample at the given index.

If Vertical is not GeoPathValue.Ellipsoid, then GeoPathSample.Height will always be zero. There is no automatic conversion, IGeoPathConverter must be used for that.

Geo​Path​Sample​On


[Pure]
public method GeoPathSampleOn → (3)

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

geocentric opt : Geocentric = null

The geocentric frame to use. If null, Vertical must be GeoPathValue.Ellipsoid, otherwise GeoPathSample.Height will always be zero. If not null, GeoPathSample.Height will be computed automatically, if necessary.

invariant opt : bool = true

true to use VerticalType.Height,
false to use VerticalType.HeightMesh.

returns → GeoPathSample

The interpolated path sample.

Returns an interpolated path sample at the given timestamp value.

If Vertical is not GeoPathValue.Ellipsoid, then GeoPathSample.Height will always be zero. There is no automatic conversion, IGeoPathConverter must be used for that.

Ground​Path​Sample​At


[Pure]
public method GroundPathSampleAt → (3)

index in : int32

[0..IGeoPathBase.Count-1]
The path sample index.

geocentric opt : Geocentric = null

The geocentric frame to use. If null, Vertical must be GeoPathValue.Height, otherwise GeoPathSample.Height will always be zero. If not null, GroundPathSample.Height will be computed automatically, if necessary.

invariant opt : bool = true

true to use VerticalType.Height,
false to use VerticalType.HeightMesh.

returns → GroundPathSample

The path sample.

Returns the path sample at the given index.

If Vertical is not GeoPathValue.Height, then GroundPathSample.Height will always be zero. There is no automatic conversion, IGeoPathConverter must be used for that.

Ground​Path​Sample​On


[Pure]
public method GroundPathSampleOn → (3)

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

geocentric opt : Geocentric = null

The geocentric frame to use. If null, Vertical must be GeoPathValue.Height, otherwise GeoPathSample.Height will always be zero. If not null, GroundPathSample.Height will be computed automatically, if necessary.

invariant opt : bool = true

true to use VerticalType.Height,
false to use VerticalType.HeightMesh.

returns → GroundPathSample

The interpolated path sample.

Returns an interpolated path sample at the given timestamp value.

If Vertical is not GeoPathValue.Height, then GroundPathSample.Height will always be zero. There is no automatic conversion, IGeoPathConverter must be used for that.

Index​Of


[Pure]
public method IndexOf → (1)

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

returns → int32

The time value index. Will be -1 if timestamp in is less than the timestamp of the path sample at index zero.

Computes the index of the path sample that has the greatest timestamp which is less than or equal to the given timestamp in.

Lat​Lon​At


[Pure]
public method LatLonAt → (1)

index in : int32

[0..IGeoPathBase.Count-1]
The path sample index.

returns → LatLon

The path sample.

Returns the path sample at the given index.

Lat​Lon​Height​At


[Pure]
public method LatLonHeightAt → (2)

index in : int32

[0..IGeoPathBase.Count-1]
The path sample index.

invariant opt : bool = true

true to return VerticalType.Height for GeoPathValue.Height,
false to return VerticalType.HeightMesh for GeoPathValue.Height.

returns → LatLonHeight

The path sample.

Returns the path sample at the given index.

Lat​Lon​Height​On


[Pure]
public method LatLonHeightOn → (2)

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

invariant opt : bool = true

true to return VerticalType.Height for GeoPathValue.Height,
false to return VerticalType.HeightMesh for GeoPathValue.Height.

returns → LatLonHeight

The interpolated path sample.

Returns an interpolated path sample at the given timestamp value.

Lat​Lon​On


[Pure]
public method LatLonOn → (1)

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

returns → LatLon

The interpolated path sample.

Returns an interpolated path sample at the given timestamp value.

Position​At


[Pure]
public method PositionAt → (2)

geocentric in : Geocentric

[not-null]
The geocentric transformation.

index in : int32

[0..IGeoPathBase.Count-1]
The path sample index.

returns → Vec3D

The geocentric position.

Computes the geocentric position of the geo path at the given index.

Position​On


[Pure]
public method PositionOn → (2)

geocentric in : Geocentric

[not-null]
The geocentric transformation.

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

returns → Vec3D

The geocentric position.

Computes the geocentric position of the geo path at the given timestamp.

Timestamp​At


[Pure]
public method TimestampAt → (1)

index in : int32

[0..IGeoPathBase.Count-1]
The path sample index.

returns → float64

The timestamp (see GeoPathSample.Timestamp).

Returns the timestamp of the path sample at the given index.

Value​At


[Pure]
public method ValueAt → (2)

index in : int32

[0..IGeoPathBase.Count-1]
The path sample index.

value in : int32

[0..IGeoPathBase.Values-1]
The path value index.

returns → float64

The path sample.

Returns a path sample value at the given index.

Value​Index


[Pure]
public method ValueIndex → (1)

value in : GeoPathValue

The GeoPathValue.

returns → int32

The value index, see Values.

Returns the value index of the given GeoPathValue.

Value​On


[Pure]
public method ValueOn → (2)

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

value in : int32

[0..IGeoPathBase.Values-1]
The path value index.

returns → float64

The interpolated path sample.

Returns an interpolated path sample value at the given timestamp value.

Yaw​Pitch​Roll​At


[Pure]
public method YawPitchRollAt → (1)

index in : int32

[0..IGeoPathBase.Count-1]
The path sample index.

returns → Vec3D

The path sample:
Vec3D.X: GeoPathValue.Yaw
Vec3D.Y: GeoPathValue.Pitch
Vec3D.Z: GeoPathValue.Roll

Returns the path sample at the given index.

Yaw​Pitch​Roll​On


[Pure]
public method YawPitchRollOn → (1)

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

returns → Vec3D

The interpolated path sample: Vec3D.X: GeoPathValue.Yaw
Vec3D.Y: GeoPathValue.Pitch
Vec3D.Z: GeoPathValue.Roll

Returns an interpolated path sample at the given timestamp value.

Public / Attributes

Count


public attribute Count → (get)

value : int32

[>=0]
The number of path samples.

The number of samples that have been added to this path.

Datum


public attribute Datum → (get)

value : GeodeticDatum

[not-null]
The datum of this geo path.

The datum to use for interpreting GeoPathValue.Latitude and GeoPathValue.Latitude.

Stable


public attribute Stable → (get)

value : int32

[0..IGeoPathBase.Count]
The number of stable samples.

The number of stable samples in the geo path.

A geo path sample is stable if the interpolated sample at its timestamp (see TimestampAt) does not change when new samples are added to the geo path.

Timestamp​Range​Stable


public attribute TimestampRangeStable → (get)

value : RangeD

The timestamp range. Will be RangeD.Zero if Stable returns 0.

The timestamp range of the stable geo path samples.

Values


public attribute Values → (get)

value : int32

[>0]
The number of raw geo path values.

The number of raw geo path values.

Vertical


public attribute Vertical → (get)

value : GeoPathValue

The vertical geo path value.

The vertical geo path value.

Extensions

Height​Above​Ground​On


[Pure]
public static method HeightAboveGroundOn → (3)

geocentric in : Geocentric

[not-null]
The geocentric transformation.

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

invariant in : bool

true to compute the invariant height (see VerticalType.Height); this might involve I/O operations and blocking,
false to compute the terrain mesh-dependent height (see VerticalType.HeightMesh), which does not block.

returns → float64

The height above ground.

Computes the height above ground of the geo path at the given timestamp.

To​Geocentric


public static method ToGeocentric → (1)

geocentric opt : Geocentric = null

The Geocentric helper object to return or null to create a new one with Geocentric.For1, passing IGeoPathBase.Datum.

returns → Geocentric

The Geocentric helper object.

Returns a Geocentric helper object for this geo path.

To​Geometry


public static method ToGeometry → (2)

curtain opt : float64 = Maths.MaxDouble

The bottom-most ellipsoid height of the geo path curtain (i.e. vertical planes). If Maths.MaxDouble, no curtain geometry will be created.

geocentric opt : Geocentric = null

The Geocentric helper object to use. If null, a new one will be created with Geocentric.For1, passing IGeoPathBase.Datum.

returns → IModelGeometrySimple

The created model geometry of null iff this geo path is empty.

Creates 3D model geometry for this geo path.

To​Shape


public static method ToShape → (2)

coordinateSystem opt : CoordinateSystem = null

The coordinate system of the shape (see IShapeInfo.Georef). If null, IGeoPathBase.Datum will be used to obtain a CoordinateSystem ( CoordinateSystem.WGS84 will be used for GeodeticDatum.WGS84).

timestamps opt : IVector<float64> = null

Optional sequence of geo path sample timestamps to use for creating the shape vertices. If null, a shape vertex will be created for each geo path sample (see IGeoPathBase.Count).

returns → IShape

The created shape or null iff this geo path is empty or coordinateSystem opt is invalid.

Creates a 2D shape for this geo path.

Velocity​At


[Pure]
public static method VelocityAt → (2)

geocentric in : Geocentric

[not-null]
The geocentric transformation.

index in : int32

[0..geoPath.Count-1]
The path sample index.

returns → float64

The geocentric velocity.

Computes the geocentric velocity of the geo path at the given index.

Velocity​On


[Pure]
public static method VelocityOn → (2)

geocentric in : Geocentric

[not-null]
The geocentric transformation.

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

returns → float64

The geocentric velocity.

Computes the geocentric velocity of the geo path at the given timestamp.

Velocity​Vector​At


[Pure]
public static method VelocityVectorAt → (2)

geocentric in : Geocentric

[not-null]
The geocentric transformation.

index in : int32

[0..geoPath.Count-1]
The path sample index.

returns → Vec3D

The geocentric velocity.

Computes the geocentric velocity vector of the geo path at the given index.

Velocity​Vector​On


[Pure]
public static method VelocityVectorOn → (2)

geocentric in : Geocentric

[not-null]
The geocentric transformation.

timestamp in : float64

The timestamp value (see GeoPathSample.Timestamp).

returns → Vec3D

The geocentric velocity.

Computes the geocentric velocity vector of the geo path at the given timestamp.