Well known binary - sibartlett/Geo GitHub Wiki

Geo can read and write WKB (Well-known binary). Geometries that implement IOgcGeometry can be read and written to WKB.

Reading

var reader = new WkbReader();
IOgcGeometry geometry1 = reader.Read(new byte[] { ... }); // reading a byte array
IOgcGeometry geometry2 = reader.Read(myStream); // reading a stream

Writing

var writer = new WkbWriter();
var pointString = writer.Write(new Point(68.389, 73.89));

A number of settings are available to customize the output. The code below shows their default values:

var settings = new WkbWriterSettings {
			Encoding = WkbEncoding.LittleEndian;
			Triangle = false;
			MaxDimesions = 4;
		};

var writer = new WkbWriter(settings); // Pass the settings object into the writer's constructor

There is also static constructor, for using settings that are compatible with NTS/JTS:

var writer = new WktWriter(WkbWriterSettings.NtsCompatible);
⚠️ **GitHub.com Fallback** ⚠️