public void WriteHeader(BinaryWriter writer) { writer.Seek(0, SeekOrigin.Begin); writer.Write(ByteEncoder.GetBigEndian(ShapeFileConstants.HeaderStartCode)); writer.Write(new Byte[20]); writer.Write(ByteEncoder.GetBigEndian(FileLengthInWords)); writer.Write(ByteEncoder.GetLittleEndian(ShapeFileConstants.VersionCode)); writer.Write(ByteEncoder.GetLittleEndian((Int32)ShapeType)); writer.Write(ByteEncoder.GetLittleEndian(Extents.GetMin(Ordinates.X))); writer.Write(ByteEncoder.GetLittleEndian(Extents.GetMin(Ordinates.Y))); writer.Write(ByteEncoder.GetLittleEndian(Extents.GetMax(Ordinates.X))); writer.Write(ByteEncoder.GetLittleEndian(Extents.GetMax(Ordinates.Y))); writer.Write(new Byte[32]); // Z-values and M-values }