C# Class SharpMap.Converters.WellKnownBinary.GeometryFromWKB

Converts Well-known Binary representations to a GeoAPI.Geometries.IGeometry instance.

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

The Well-known Binary Representation for GeoAPI.Geometries.IGeometry is obtained by serializing a GeoAPI.Geometries.IGeometry 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: jumpinjackie/fdotoolbox

Public Methods

Method Description
Parse ( BinaryReader reader ) : Geometry

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

Parse ( byte bytes ) : Geometry

Creates a SharpMap.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 ) : System.Point[]
ReadDouble ( BinaryReader reader, WkbByteOrder byteOrder ) : double
ReadUInt32 ( BinaryReader reader, WkbByteOrder byteOrder ) : uint

Method Details

Parse() public static method

Creates a SharpMap.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 SharpMap.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