public void PointToByteArray() { Random rnd = new Random(); Coordinate c = new Coordinate((rnd.NextDouble() + 360) - 180, (rnd.NextDouble() * 180) - 90); Point p = new Point(c); byte[] vals = p.ToBinary(); WkbReader wkr = new WkbReader(); IGeometry g = wkr.Read(vals); Point pt = g as Point; if (pt != null) { Assert.AreEqual(p.X, pt.X); Assert.AreEqual(p.Y, pt.Y); } else { Assert.Fail("The test failed bc the check pt was null."); } }