/// <summary> /// The index of the first point in the part. /// </summary> private IntField Part(int partIndex) { //TODO: Do we have to do all of this math again and again for every part? var offset = Offset + WordCount.FromBytes(40) + (partIndex * IntField.FieldLength); return(new IntField(offset, Endianness.Little)); }
public ShapefileHeaderField(WordCount offset) : base(offset) { FileCode = new IntField(offset, Endianness.Big); Unused1 = new IntField(offset + WordCount.FromBytes(4), Endianness.Big); Unused2 = new IntField(offset + WordCount.FromBytes(8), Endianness.Big); Unused3 = new IntField(offset + WordCount.FromBytes(12), Endianness.Big); Unused4 = new IntField(offset + WordCount.FromBytes(16), Endianness.Big); Unused5 = new IntField(offset + WordCount.FromBytes(20), Endianness.Big); FileLength = new WordCountField(offset + WordCount.FromBytes(24)); Version = new IntField(offset + WordCount.FromBytes(28), Endianness.Little); ShapeType = new ShapeTypeField(offset + WordCount.FromBytes(32)); BoxMin = new PointZField( offset + WordCount.FromBytes(36), offset + WordCount.FromBytes(44), offset + WordCount.FromBytes(68), offset + WordCount.FromBytes(84) ); BoxMax = new PointZField( offset + WordCount.FromBytes(52), offset + WordCount.FromBytes(60), offset + WordCount.FromBytes(76), offset + WordCount.FromBytes(92) ); }
public MultiPatchShapeField(WordCount offset) : base(offset) { Box = new BoundingBox2dField(offset); NumParts = new IntField(offset + WordCount.FromBytes(32), Endianness.Little); NumPoints = new IntField(offset + WordCount.FromBytes(36), Endianness.Little); }
/// <summary> /// The offset of the first part. /// </summary> private WordCount OffsetParts() { var offset = Offset + WordCount.FromBytes(40); return(offset); }
/// <summary> /// The offset of the first point. /// </summary>s> private WordCount OffsetPoints(int numParts) { return(Offset + WordCount.FromBytes(40) + (numParts * IntField.FieldLength)); }
/// <summary> /// The offset of the first point. /// </summary>s> private WordCount OffsetPoints(int numParts) { var offset = Offset + WordCount.FromBytes(40) + (numParts * IntField.FieldLength); return(offset); }