예제 #1
0
        public static ShpFileBody ReadShpFileBody(BinaryReader binaryReader)
        {
            ShpFileBody shpBody = new ShpFileBody();

            shpBody.recordNo      = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpBody.recordLength  = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpBody.recordContent = binaryReader.ReadBytes(shpBody.recordLength * 2);
            //读取逻辑
            return(shpBody);
        }
예제 #2
0
        public static ShpHeader ReadShpHeader(BinaryReader binaryReader)
        {
            ShpHeader shpHeader = new ShpHeader();

            shpHeader.fileCode    = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpHeader.unUse1      = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpHeader.unUse2      = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpHeader.unUse3      = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpHeader.unUse4      = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpHeader.unUse5      = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpHeader.fileLength  = ShpFunction.ReadInt32WithBigEnduim(binaryReader);
            shpHeader.fileVersion = binaryReader.ReadInt32();
            shpHeader.shapeType   = binaryReader.ReadInt32();
            shpHeader.boundingBox = ShpFunction.ReadBoundingBox(binaryReader);
            //读取逻辑
            return(shpHeader);
        }