C# Class Mapsui.Geometries.WellKnownBinary.GeometryFromWKB

Converts Well-known Binary representations to a Mapsui.Geometries.Geometry instance.

The Well-known Binary Representation for Mapsui.Geometries.Geometry (WKBGeometry) provides a portable representation of a Mapsui.Geometries.Geometry value as a contiguous stream of bytes. It permits Mapsui.Geometries.Geometry values to be exchanged between an ODBC client and an SQL database in binary form.

The Well-known Binary Representation for Mapsui.Geometries.Geometry is obtained by serializing a Mapsui.Geometries.Geometry instance as a sequence of numeric types drawn from the set {Unsigned Integer, Double} and then serializing each numeric type as a sequence of bytes using one of two well defined, standard, binary representations for numeric types (NDR, XDR). The specific binary encoding (NDR or XDR) used for a geometry byte stream is described by a one byte tag that precedes the serialized bytes. The only difference between the two encodings of geometry is one of byte order, the XDR encoding is Big Endian, the NDR encoding is Little Endian.

Datei anzeigen Open project: pauldendulk/Mapsui

Public Methods

Method Description
Parse ( BinaryReader reader ) : Geometry

Creates a Mapsui.Geometries.Geometry based on the Well-known binary representation.

Parse ( byte bytes ) : Geometry

Creates a Mapsui.Geometries.Geometry from the supplied byte[] containing the Well-known Binary representation.

Private Methods

Method Description
CreateWKBGeometryCollection ( BinaryReader reader, WkbByteOrder byteOrder ) : Geometry
CreateWKBLineString ( BinaryReader reader, WkbByteOrder byteOrder ) : LineString
CreateWKBLinearRing ( BinaryReader reader, WkbByteOrder byteOrder ) : LinearRing
CreateWKBMultiLineString ( BinaryReader reader, WkbByteOrder byteOrder ) : MultiLineString
CreateWKBMultiPoint ( BinaryReader reader, WkbByteOrder byteOrder ) : MultiPoint
CreateWKBMultiPolygon ( BinaryReader reader, WkbByteOrder byteOrder ) : MultiPolygon
CreateWKBPoint ( BinaryReader reader, WkbByteOrder byteOrder ) : System.Point
CreateWKBPolygon ( BinaryReader reader, WkbByteOrder byteOrder ) : Polygon
ReadCoordinates ( BinaryReader reader, WkbByteOrder byteOrder ) : IEnumerable
ReadDouble ( BinaryReader reader, WkbByteOrder byteOrder ) : double
ReadUInt32 ( BinaryReader reader, WkbByteOrder byteOrder ) : uint

Method Details

Parse() public static method

Creates a Mapsui.Geometries.Geometry based on the Well-known binary representation.
public static Parse ( BinaryReader reader ) : Geometry
reader System.IO.BinaryReader /// A BinaryReader used to read the Well-known binary /// representation. ///
return Geometry

Parse() public static method

Creates a Mapsui.Geometries.Geometry from the supplied byte[] containing the Well-known Binary representation.
public static Parse ( byte bytes ) : Geometry
bytes byte byte[] containing the Well-known Binary representation.
return Geometry