public virtual ShapeObject ReadShape(DataRow row) { DataTable table = row.Table; if (!table.Columns.Contains("Shape")) { return(nullShape); } else { return(ShapeBuilder.BuildObject(ReadBytes(row, "Shape"))); } }
// test code public void test() { var objs = objsContainer["AllTunnels"]; var obj = objs.values.FirstOrDefault(); var row = obj.rawData; var shape = row["Shape"]; byte[] bytes = (byte[])shape; //int i = BitConverter.ToInt32(bytes, 0); //double x1 = BitConverter.ToDouble(bytes, 4); //double y1 = BitConverter.ToDouble(bytes, 12); //double x2 = BitConverter.ToDouble(bytes, 20); //double y2 = BitConverter.ToDouble(bytes, 28); ShapeObject shp = ShapeBuilder.BuildObject(bytes); }