public new static ShapefileDataWriter Open(string path)
        {
            ShapefileHeader header;
            int             recordNumber;

            using (BinaryReader reader = new BinaryReader(new FileStream(Path.ChangeExtension(path, ".shx"), FileMode.Open)))
            {
                header       = ShapefileHeader.Read(reader);
                recordNumber = ((int)(reader.BaseStream.Length - 100) / 8) + 1;
            }

            ShapefileDataWriter writer = new ShapefileDataWriter(path, header, FileMode.Append, FileAccess.Write);

            writer._writerShape.BaseStream.Seek(0, SeekOrigin.End);
            writer._writerIndex.BaseStream.Seek(0, SeekOrigin.End);

            writer._recordNumber = recordNumber;
            writer._filePos      = (int)writer._writerShape.BaseStream.Length / 2;

            // Need to push dbf reader to end of file.
            writer._dbf           = DbfFile.Open(Path.ChangeExtension(path, ".dbf"));
            writer._currentRecord = new DbfRecord(writer._dbf.Header);

            return(writer);
        }
        public static ShapefileDataWriter Create(string path, DbfHeader dbfHeader, ShapefileHeader shapeHeader)
        {
            ShapefileDataWriter writer = new ShapefileDataWriter(path, shapeHeader, FileMode.CreateNew, FileAccess.Write);

            writer._writerShape.BaseStream.Seek(100L, SeekOrigin.Begin);
            writer._writerIndex.BaseStream.Seek(100L, SeekOrigin.Begin);

            writer._dbf = DbfFile.Create(Path.ChangeExtension(path, ".dbf"), dbfHeader);
            writer._currentRecord = new DbfRecord(dbfHeader);

            writer._recordNumber = 1;
            writer._filePos = 50;

            return writer;
        }
        public static ShapefileDataWriter Create(string path, DbfHeader dbfHeader, ShapefileHeader shapeHeader)
        {
            ShapefileDataWriter writer = new ShapefileDataWriter(path, shapeHeader, FileMode.CreateNew, FileAccess.Write);

            writer._writerShape.BaseStream.Seek(100L, SeekOrigin.Begin);
            writer._writerIndex.BaseStream.Seek(100L, SeekOrigin.Begin);

            writer._dbf           = DbfFile.Create(Path.ChangeExtension(path, ".dbf"), dbfHeader);
            writer._currentRecord = new DbfRecord(dbfHeader);

            writer._recordNumber = 1;
            writer._filePos      = 50;

            return(writer);
        }
        public static new ShapefileDataWriter Open(string path)
        {
            ShapefileHeader header;
            int recordNumber;
            using (BinaryReader reader = new BinaryReader(new FileStream(Path.ChangeExtension(path, ".shx"), FileMode.Open)))
            {
                header = ShapefileHeader.Read(reader);
                recordNumber = ((int)(reader.BaseStream.Length - 100) / 8) + 1;
            }

            ShapefileDataWriter writer = new ShapefileDataWriter(path, header, FileMode.Append, FileAccess.Write);

            writer._writerShape.BaseStream.Seek(0, SeekOrigin.End);
            writer._writerIndex.BaseStream.Seek(0, SeekOrigin.End);

            writer._recordNumber = recordNumber;
            writer._filePos = (int)writer._writerShape.BaseStream.Length / 2;

            // Need to push dbf reader to end of file.
            writer._dbf = DbfFile.Open(Path.ChangeExtension(path, ".dbf"));
            writer._currentRecord = new DbfRecord(writer._dbf.Header);

            return writer;
        }