Show / Hide Table of Contents

Class Encoder

Encoder/decoder for OSM-PBF format.

Inheritance
System.Object
Encoder
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 Encoder

Fields

OSMData

The string representing and OSMData type.

Declaration
public static string OSMData
Field Value
System.String

OSMHeader

The string representing an OSMHeader type.

Declaration
public static string OSMHeader
Field Value
System.String

Methods

Decode(PrimitiveBlock, IPBFOsmPrimitiveConsumer, Boolean, Boolean, Boolean, out Boolean, out Boolean, out Boolean)

Decodes the block.

Declaration
public static bool Decode(this PrimitiveBlock block, IPBFOsmPrimitiveConsumer primitivesConsumer, bool ignoreNodes, bool ignoreWays, bool ignoreRelations, out bool hasNodes, out bool hasWays, out bool hasRelations)
Parameters
PrimitiveBlock block

IPBFOsmPrimitiveConsumer primitivesConsumer

System.Boolean ignoreNodes

System.Boolean ignoreWays

System.Boolean ignoreRelations

System.Boolean hasNodes

System.Boolean hasWays

System.Boolean hasRelations

Returns
System.Boolean

DecodeLatLon(Int64, Int64, Int64)

Decodes a lat/lon value from an offset.

Declaration
public static double DecodeLatLon(long valueOffset, long offset, long granularity)
Parameters
System.Int64 valueOffset

System.Int64 offset

System.Int64 granularity

Returns
System.Double

DecodeNode(PrimitiveBlock, Node)

Converts the PBF node into an OsmSharp-node.

Declaration
public static Node DecodeNode(PrimitiveBlock block, Node pbfNode)
Parameters
PrimitiveBlock block

Node pbfNode

Returns
Node

DecodeNode(PrimitiveBlock, Node, Node)

Converts the PBF node into an OsmSharp-node.

Declaration
public static Node DecodeNode(PrimitiveBlock block, Node pbfNode, Node node)
Parameters
PrimitiveBlock block

Node pbfNode

Node node

Returns
Node

DecodeRelation(PrimitiveBlock, Relation)

Converts a PBF way into an OsmSharp-relation.

Declaration
public static Relation DecodeRelation(PrimitiveBlock block, Relation pbfRelation)
Parameters
PrimitiveBlock block

Relation pbfRelation

Returns
Relation

DecodeRelation(PrimitiveBlock, Relation, Relation)

Converts a PBF way into an OsmSharp-relation.

Declaration
public static Relation DecodeRelation(PrimitiveBlock block, Relation pbfRelation, Relation relation)
Parameters
PrimitiveBlock block

Relation pbfRelation

Relation relation

Returns
Relation

DecodeTimestamp(Int32, Int64)

Decodes a timestamp.

Declaration
public static DateTime DecodeTimestamp(int timestamp, long dateGranularity)
Parameters
System.Int32 timestamp

System.Int64 dateGranularity

Returns
System.DateTime

DecodeWay(PrimitiveBlock, Way)

Converts a PBF way into an OsmSharp-way.

Declaration
public static Way DecodeWay(PrimitiveBlock block, Way pbfWay)
Parameters
PrimitiveBlock block

Way pbfWay

Returns
Way

DecodeWay(PrimitiveBlock, Way, Way)

Converts a PBF-way into an OsmSharp-way.

Declaration
public static void DecodeWay(PrimitiveBlock block, Way pbfWay, Way way)
Parameters
PrimitiveBlock block

Way pbfWay

Way way

Encode(PrimitiveBlock, Dictionary<String, Int32>, List<OsmGeo>, Boolean)

Encodes the nodes into the given block.

Declaration
public static void Encode(this PrimitiveBlock block, Dictionary<string, int> reverseStringTable, List<OsmGeo> osmGeos, bool compressed)
Parameters
PrimitiveBlock block

Dictionary<System.String, System.Int32> reverseStringTable

List<OsmGeo> osmGeos

System.Boolean compressed

EncodeLatLon(Double, Int64, Int64)

Encodes a lat/lon value into an offset.

Declaration
public static long EncodeLatLon(double value, long offset, long granularity)
Parameters
System.Double value

System.Int64 offset

System.Int64 granularity

Returns
System.Int64

EncodeNode(PrimitiveBlock, Dictionary<String, Int32>, Node, Node)

Encodes an OsmSharp-node into a PBF-node.

Declaration
public static Node EncodeNode(PrimitiveBlock block, Dictionary<string, int> reverseStringTable, Node pbfNode, Node node)
Parameters
PrimitiveBlock block

Dictionary<System.String, System.Int32> reverseStringTable

Node pbfNode

Node node

Returns
Node

EncodeNode(PrimitiveBlock, Dictionary<String, Int32>, Node)

Encodes an OsmSharp-node into a PBF-node.

Declaration
public static Node EncodeNode(PrimitiveBlock block, Dictionary<string, int> reverseStringTable, Node node)
Parameters
PrimitiveBlock block

Dictionary<System.String, System.Int32> reverseStringTable

Node node

Returns
Node

EncodeRelation(PrimitiveBlock, Dictionary<String, Int32>, Relation)

Encodes an OsmSharp-relation into a PBF-relation.

Declaration
public static Relation EncodeRelation(PrimitiveBlock block, Dictionary<string, int> reverseStringTable, Relation relation)
Parameters
PrimitiveBlock block

Dictionary<System.String, System.Int32> reverseStringTable

Relation relation

Returns
Relation

EncodeString(PrimitiveBlock, Dictionary<String, Int32>, String)

Encodes a string.

Declaration
public static int EncodeString(PrimitiveBlock block, Dictionary<string, int> reverseStringTable, string value)
Parameters
PrimitiveBlock block

Dictionary<System.String, System.Int32> reverseStringTable

System.String value

Returns
System.Int32

EncodeTimestamp(DateTime, Int64)

Encodes a timestamp.

Declaration
public static int EncodeTimestamp(DateTime timestamp, long dateGranularity)
Parameters
System.DateTime timestamp

System.Int64 dateGranularity

Returns
System.Int32

EncodeWay(PrimitiveBlock, Dictionary<String, Int32>, Way)

Encodes an OsmSharp-way into a PBF-way.

Declaration
public static Way EncodeWay(PrimitiveBlock block, Dictionary<string, int> reverseStringTable, Way way)
Parameters
PrimitiveBlock block

Dictionary<System.String, System.Int32> reverseStringTable

Way way

Returns
Way

Back to top Built by Itinero, MIT licensed.