C# Class MapAround.Serialization.BinaryGeometrySerializer

Serializes geometries into binary format. Also performs inverse operation.

Binary representation used by this class is non standart and leaves original coordinate sequences unchanged. While other formats like WKB has a strong constraints of topology and causes a changes in coordinate sequences.

ファイルを表示 Open project: gkrsu/maparound.core Class Usage Examples

Public Methods

Method Description
DeserializeGeometry ( Stream stream ) : IGeometry

Deserializes a geometry from the specified stream.

DeserializeMultiPoint ( Stream stream ) : MultiPoint

Deserializes an instance of MapAround.Geometry.MultiPoint from the specified stream.

DeserializePoint ( Stream stream ) : PointD

Deserializes an instance of MapAround.Geometry.PointD from the specified stream.

DeserializePolygon ( Stream stream ) : Polygon

Deserializes an instance of MapAround.Geometry.Polygon from the specified stream.

DeserializePolyline ( Stream stream ) : Polyline

Deserializes an instance of MapAround.Geometry.Polyline from the specified stream.

SerializeGeometry ( Stream stream, IGeometry geometry ) : void

Serializes specified geometry into stream.

SerializeMultiPoint ( Stream stream, MultiPoint multiPoint ) : void

Serializes an instance of MapAround.Geometry.MultiPoint into stream.

SerializePoint ( Stream stream, PointD point ) : void

Serializes an instance of MapAround.Geometry.PointD into stream.

SerializePolygon ( Stream stream, Polygon polygon ) : void

Serializes an instance of MapAround.Geometry.Polygon into stream.

SerializePolyline ( Stream stream, Polyline polyline ) : void

Serializes an instance of MapAround.Geometry.Polyline into stream.

Private Methods

Method Description
readDouble ( Stream stream ) : double
readInt ( Stream stream ) : int
writeDouble ( Stream stream, double value ) : void
writeInt ( Stream stream, int value ) : void

Method Details

DeserializeGeometry() public static method

Deserializes a geometry from the specified stream.
public static DeserializeGeometry ( Stream stream ) : IGeometry
stream Stream A stream containing the geometry
return IGeometry

DeserializeMultiPoint() public static method

Deserializes an instance of MapAround.Geometry.MultiPoint from the specified stream.
public static DeserializeMultiPoint ( Stream stream ) : MultiPoint
stream Stream A stream containing the multipoint geometry
return MultiPoint

DeserializePoint() public static method

Deserializes an instance of MapAround.Geometry.PointD from the specified stream.
public static DeserializePoint ( Stream stream ) : PointD
stream Stream A stream containing the point geometry
return PointD

DeserializePolygon() public static method

Deserializes an instance of MapAround.Geometry.Polygon from the specified stream.
public static DeserializePolygon ( Stream stream ) : Polygon
stream Stream A stream containing the polygon geometry
return Polygon

DeserializePolyline() public static method

Deserializes an instance of MapAround.Geometry.Polyline from the specified stream.
public static DeserializePolyline ( Stream stream ) : Polyline
stream Stream A stream containing the polyline geometry
return Polyline

SerializeGeometry() public static method

Serializes specified geometry into stream.
public static SerializeGeometry ( Stream stream, IGeometry geometry ) : void
stream Stream A stream to write serializing geometry
geometry IGeometry A geometry
return void

SerializeMultiPoint() public static method

Serializes an instance of MapAround.Geometry.MultiPoint into stream.
public static SerializeMultiPoint ( Stream stream, MultiPoint multiPoint ) : void
stream Stream A stream to write serializing geometry
multiPoint MultiPoint A multipoint geometry
return void

SerializePoint() public static method

Serializes an instance of MapAround.Geometry.PointD into stream.
public static SerializePoint ( Stream stream, PointD point ) : void
stream Stream A stream to write serializing geometry
point PointD A point geometry
return void

SerializePolygon() public static method

Serializes an instance of MapAround.Geometry.Polygon into stream.
public static SerializePolygon ( Stream stream, Polygon polygon ) : void
stream Stream A stream to write serializing geometry
polygon Polygon A polygon geometry
return void

SerializePolyline() public static method

Serializes an instance of MapAround.Geometry.Polyline into stream.
public static SerializePolyline ( Stream stream, Polyline polyline ) : void
stream Stream A stream to write serializing geometry
polyline Polyline A polyline geometry
return void