|
|
/**********************************************************************
* $Id: mitab_tabdef,v .2 2000/14/05 06:00:00 $
*
* Name: mitab_tabdef
* Project: MapInfo TAB file "open source" documentation
* Language: Delphi
* Purpose: TAB file definitions for the mitab library.
* Author: Robert Edwards, The MapTools Company, EdwardsRG@aol.com
*
**********************************************************************
* Copyright (c) 1999,2000 Robert Edwards
*
* All rights reserved. This software may be copied or reproduced, in
* all or in part, without the prior written consent of its author,
* Robert Edwards (EdwardsRG@aol.com). However, any material copied
* or reproduced must bear the original copyright notice (above), this
* original paragraph, and the original disclaimer (below).
*
* The entire risk as to the results and performance of the software,
* supporting text and other information contained in this file
* (collectively called the "Software") is with the user. Although
* considerable efforts have been used in preparing the Software, the
* author does not warrant the accuracy or completeness of the Software.
* In no event will the author be liable for damages, including loss of
* profits or consequential damages, arising out of the dissemination of
* this material.
*
**********************************************************************/
LongMBR = packed record
XMin,YMin,XMax,YMax :integer;
end;
ShortMBR = packed record
XMin,YMin,XMax,YMax :SmallInt;
end;
MBRVar = packed record
XMin,YMin,XMax,YMax :Var(LongMBR,ShortMBR);
end;
HeadBlock = packed record // Type 0 Block
ObjectLengthArray :array [0..51] of byte; //000h - 033h
Fill :array [0..203] of byte;//034h - 0FFh
MagicCookie :integer; //100h 42424242
VersionNumber :word; //104h
BlockSize :word; //106h
Coord2DistUnits :double; //108h
FileMBR :LongMBR; //110h
DefaultView :LongMBR; //120h
FirstIndexBlock :integer; //130h
FirstGarbageBlock :integer; //134h
FirstResourceBlock :integer; //138h
numPointObjects :integer; //13Ch
numLineObjects :integer; //140h
numRegionObjects :integer; //144h
numTextObjects :integer; //148h
MaxCoordBufSize :integer; //14Ch
UnknownA :array[0..13] of byte //140h
DistUnitsCode :byte; //15Eh
MBR_ResBlockFlag :byte; //15Fh
CoordPrecision :byte; //160h
CoordOriginQuadrant :byte; //161h
ReflectXAxisCoord :byte; //162h
ObjLenArraySize :integer; //163h
numPenDefs :integer; //164h
numBrushDefs :integer; //165h
numSymbolDefs :integer; //166h
numFontDefs :integer; //167h
numResourceBlocks :integer; //168h
UnknownB :byte //16Ch
ProjectionCode :byte; //16Dh
DatumCode :byte; //16Eh
ProjectionUnitsCode :byte; //16Fh
XScale,YScale,X0,Y0 :double; //170h
ProjParms :array[0..5] of double; //190h
DatumParms :array[0..6] of double; //1C0h
AffineParms :array[0..5] of double; //1F8h
end;
------------------------------------------------------------------------
MBRBlock = packed record // Type 1 record
Header :MBRBlockHeader;
MBRs :Array[] of MBRBlocks;
end;
MBRBlockHeader = packed record
BlockCode :word;
MBRCount :word;
end;
MBRBlocks = packed record
BlockMBR :LongMBR;
LinkToBlock :integer;
end;
------------------------------------------------------------------------
Feature Object Codes
------- ------------
Point 1, 2
Line 4, 5
PolyLine 7, 8
Arc 10, 11
Region 13, 14
Text 16, 17
Rectangle 19, 20
RndRect 22, 23
Ellipse 25, 26
MultiPline 37, 38
TrueTypeSymbol 40, 41
CustomSymbol 43, 44
LargeMultiPline 46, 47
LargeRegion 49, 50
------------------------------------------------------------------------
ObjectBlock = packed record // Type 2 record
BlockCode :word;
ByteCount :word;
Link :integer;
BlockOrigX :integer; //004H
BlockOrigY :integer; //008H
CoordBlockStartNumber :integer; //00CH
CoordBlockEndNumber :integer; //0100
Objects :Array[] of Var(PointBlock,LineBlock,
PolyLineBlock,ArcBlock,RegionBlock,
TextBlock,RectBlock,EllipseBlock,
MultiPlinBlock,TrueTypeSymbolBlock,
CustomSymbolBlock,LargeMultiPline,
LargeRegion);
end;
// In the following the phrase
code n:mm/$kk means |code n|:|length(dec)|length(hex)|
for example, the phrase 1:10/$0A means
the object with ObjectCode 1 has length 10(dec) [which is 0A(hex)]
PointBlock = packed record //Object code (1:10/$0A; 2:14/$0E; 3:21/$15)
ObjectCode :byte;
AttributeIndex :integer;
X,Y :SmallInt/integer;
SymbolCode :byte;
end;
LineBlock = packed record //Object code (4:14/$0E; 5:22/$16; 6:27/$1B)
ObjectCode :byte;
AttributeIndex :integer;
MBR :MBRVar;
PenCode :byte;
end;
PolyLineBlock = packed record // Object code (7:34/$22; 8:38/$26; 9:43/$2B)
ObjectCode :byte;
AttributeIndex :integer;
OffsetToCoordData :integer;
ByteCountOfCoordData :integer;
CentX,CentY :SmallInt/integer;
MBR :MBRVar;
PenCode :byte;
end;
ArcBlock = packed record // Object code (10:26/$1A; 11:42/$2A; 12:47/$2F)
ObjectCode :byte;
AttributeIndex :integer;
StartAng,EndAng :word;
EllipseMBR :MBRVar;
MBR :MBRVar;
PenCode :byte;
end;
RegionBlock = packed record // Object code (13:37/$25; 14:41/$29; 15:53/$35)
ObjectCode :byte;
AttributeIndex :integer;
SectionDefsPointer :integer;
ByteCountOfCoordData :integer;
RegionCount :SmallInt;
CentX,CentY :SmallInt/integer;
MBR :MBRVar;
PenCode :byte;
PatternCode :byte;
end;
TextObjectBlock = packed record // Object code (16:39/$27; 17:53/$35; 18: 89/$59)
ObjectCode :byte;
AttributeIndex :integer;
TextAddress :integer;
Length :word;
Angle :SmallInt;
Style :word;
ForeRGB :array[0..2] of byte;
BackRGB :array[0..2] of byte;
X,Y :SmallInt/integer;
Height :SmallInt/integer;
FontNameIndex :byte;
MinX,MinY,MaxX,MaxY :MBRVar;
PenCodeIndex :byte;
end;
RectangleBlock = packed record // Object code (19:15/$0F; 20:23/$17; 21:35/$23)
ObjectCode :byte;
AttributeIndex :integer;
MBR :MBRVar;
PenCode :byte;
PatternCode :byte;
end;
RoundRectBlock = packed record // Object code (22:19/$13; 23:31/$1F; 24:43/$2B)
ObjectCode :byte;
AttributeIndex :integer;
RadiusX,RadiusY :SmallInt/integer;
MBR :MBRVar;
PenCode :byte;
PatternCode :byte;
end;
EllipseBlock = packed record // Object code (25:15/$0F; 26:23/$17; 27:35/$23)
ObjectCode :byte;
AttributeIndex :integer;
MBR :MBRVar;
PenCode :byte;
PatternCode :byte;
end;
MultiPolyBlock = packed record // Object code (37:36/$24; 38:40/$28; 39:45/$2D)
ObjectCode :byte;
AttributeIndex :integer;
SectionDefsPointer :integer;
ByteCountOfCoordData :integer;
RegionCount :SmallInt;
CentX,CentY :SmallInt/integer;
MBR :MBRVar;
PenCode :byte;
end;
TrueTypePointBlock = packed record // Object code (40:22/$16;41:26/$1A; 42:57/$39)
ObjectCode :byte;
AttributeIndex :integer;
SymbolNumber :byte;
Size :byte;
Style :word;
ForeRGB :array[0..2] of byte;
BackRGB :array[0..2] of byte;
Angle :SmallInt;
X,Y :SmallInt/Integer;
FoneNameCode :byte;
end;
CustomPointBlock = packed record // Object code (43:13/$0D; 44:17/$11: 45:55/$37)
ObjectCode :byte;
AttributeIndex :integer;
SpareByte :byte;
Style :byte;
X,Y :SmallInt/Integer;
SymbolCode :byte;
FileNameCode :byte;
end;
LargeMultiPolyBlock = packed record // Object code (46:37/$25; 47:41/$29; 48:53/$35)
ObjectCode :byte;
AttributeIndex :integer;
SectionDefsPointer :integer;
ByteCountOfCoordData :integer;
RegionCount :SmallInt;
CentX,CentY :SmallInt/integer;
MBR :MBRVar;
PenCode :byte;
end;
LargeRegionBlock = packed record // Object code (49:36/$24; 50:40/$28; 51:52/$34)
ObjectCode :byte;
AttributeIndex :integer;
SectionDefsPointer :integer;
ByteCountOfCoordData :integer;
RegionCount :SmallInt;
CentX,CentY :SmallInt/integer;
MBR :MBRVar;
PenCode :byte;
PatternCode :byte;
end;
------------------------------------------------------------------------
CoordBlock = packed record // Type 3 Block
BlockCode :word;
ByteCount :word;
LinkToNextCoordBlock :integer;
CoordBlockData :Array[] of Var(TextString,
word/integer(Array[] of CoordVar),
word/integer(Array[] of PolyBlock),
word/integer(Array{} of LrgPolyBlock);
PolyBlock = packed record
SectionDefs :Array[] of Var(Array[] of SectionDef,
Array[] of CoordVar);
Coords :Array{} of CoordVar;
end;
LrgPolyBlock = packed record
LrgSectionDefs :Array[] of Var(Array[] of LrgSectionDef,
Array[] of CoordVar);
Coords :Array{} of CoordVar;
end;
SectionDef = packed record
CoordDataCount :SmallInt;
NumberOfHoles :SmallInt;
MBR :MBRVar;
CoordDataPointer :integer;
end;
LrgSectionDef = packed record
CoordDataCount :integer;
NumberOfHoles :SmallInt;
MBR :MBRVar;
CoordDataPointer :integer;
Padding :SmallInt;
end;
------------------------------------------------------------------------
ResourceBlock = packed record // Type 5 Block
Header :ResourceBlockHeader
Resources :Array[] of Var(PenBlock,BrushBlock
NameBlock,SymbolBlock);
end;
PenBlock = packed record
Identifier :byte; //1
ObjectsRefThisDef :integer;
Width :byte;
Pattern :byte;
Style :byte;
Color :array[0..2] of byte;
end;
BrushBlock = packed record
Identifier :byte; //2
ObjectsRefThisDef :integer;
Pattern :byte;
TransparentFill :byte;
ForeColor :array[0..2] of byte;
BackColor :array[0..2] of byte;
end;
NameBlock = packed record
Identifier :byte; //3
ObjectsRefThisDef :integer;
Name :szString;
end;
SymbolBlock = packed record
Identifier :byte; //4
ObjectsRefThisDef :integer;
Shape :word;
Size :word;
Spare :byte;
Color :array[0..2] of byte;
end;
------------------------------------------------------------------------
|

Sponsored by:

For information regarding advertising rates Click Here!
|