Show / Hide Table of Contents

Class OffsetConvertor

Represents an offset flag convertor that encodes/decodes into the binary OpenLR format.

Inheritance
System.Object
OffsetConvertor
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public static class OffsetConvertor

Methods

Decode(Byte[], Int32)

Decodes the offset in meter.

Declaration
public static float Decode(byte[] data, int startIndex)
Parameters
System.Byte[] data

System.Int32 startIndex

Returns
System.Single

DecodeFlag(Byte[], Int32, Int32)

Decodes an offset flag from binary data.

Declaration
public static bool DecodeFlag(byte[] data, int startIndex, int byteIndex)
Parameters
System.Byte[] data

The binary data.

System.Int32 startIndex

The index of the byte in data.

System.Int32 byteIndex

The index of the data in the given byte.

Returns
System.Boolean

Encode(Single, Byte[], Int32)

Encodes the offset in meter as a value relative to the length in meter.

Declaration
public static void Encode(float positiveOffsetPercentage, byte[] data, int startIndex)
Parameters
System.Single positiveOffsetPercentage

System.Byte[] data

System.Int32 startIndex

EncodeFlag(Boolean, Byte[], Int32, Int32)

Encodes an offset flag into binary data.

Declaration
public static void EncodeFlag(bool offset, byte[] data, int startIndex, int byteIndex)
Parameters
System.Boolean offset

System.Byte[] data

System.Int32 startIndex

System.Int32 byteIndex

Back to top Built by Itinero, MIT licensed.