Show / Hide Table of Contents

    Class GeometryToWKB

    Converts a Geometry instance to a Well-known Binary string representation.

    Inheritance
    System.Object
    GeometryToWKB
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Mapsui.Geometries.WellKnownBinary
    Assembly: Mapsui.Geometries.dll
    Syntax
    public static class GeometryToWKB
    Remarks

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

    The Well-known Binary Representation for Geometry is obtained by serializing a 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.

    Methods

    | Improve this Doc View Source

    Write(Geometry, WkbByteOrder)

    Writes a geometry to a byte array using the specified encoding.

    Declaration
    public static byte[] Write(Geometry g, WkbByteOrder wkbByteOrder = WkbByteOrder.Ndr)
    Parameters
    Type Name Description
    Geometry g

    The geometry to write

    WkbByteOrder wkbByteOrder

    Byte order

    Returns
    Type Description
    System.Byte[]

    WKB representation of the geometry

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX