public void Serialize(Geometry geometry, Stream stream) { byte[] buffer = new WkbWriter().Write(geometry); stream.Write(buffer, 0, buffer.Length); }