"Integral file" - russian GIS file format(INF.rfi):
Class: GIS files, Status: Complete, Last change: 16.11.2001 13:22:10

type

TSign array[3] of char

data
0x0000 TSign Sign
0x0003 Byte SignZ

assert (Sign='INF')and(SignZ=0);

descr ('The Integral file - format of Russian GIS.')
descr (NL,
  'Info Src: VS AGP doc. INT_RAS2.DOC',NL)

type

TInfHead struc pas
  BaseName: array[41] of Char,0;
  KlsName: array[13] of Char,0;
  FileCreationDate: array[11] of Char,0;
  FileCreationTime: array[9] of Char,0;
  Xmin: Int
  Ymin: Int
  Xmax: Int
  Ymax: Int
  NumbKVX: Int
  NumbKVY: Int
  SizeKVX: Word
  SizeKVY: Word
  NumbKVAll: Word
ends

type

TRecTag enum int (
  Obj=777
)

TObjCode array[9] of int,0;:displ=(ShowArray(@,(@,'.')))

TObjectRec(N) forward

PObjectRec(N,Base) ^TObjectRec(@:N) near=ulong REF=@*2+@:Base;

TLogSObj set 32 of (//T   
  Lin=0, //Tv
  Area=1, //v      
  Discr=2, //-pv     
  Compos=3, //T
  Compl=4, //Tv
  Closed=5, //v      
  Strait=6, //-  
  Arc=7, //T p
  Part=9, //+𸪹 p  
  Hole=10, //Tp   
  Link=11, //T v
  MultyLink=12, //v   
  Cut=13, //v    
  Bit15=15, //+ 򸪨
  URRMtr=18 //p  L  
)

TLogSIntr set 32 of (//T  ppv
  Lin=0, //Tv
  Area=1, //v      
  Discr=2, //-pv     
  NotAllowed=3, //= 
  FullDesc=4, //   
  Straight=6, //-  
  Arc=7, //T p
  Dir=8, //=p 
  Sem=9, //T  
  FixP=10, //= 
  SignChg=11, //T 
  MtrImp=12, //   
  StrucEl=13, //   
  MtrOn=14, //   
  MtrImp1=15, //p 
  PrecCoord=16, //Tv   
  PointChg=17, //    
  MtrImp2=18, //p   
  Rel=29 //+ p
)

TFeatureType enum byte (
  ftInt=1,  // int
  ftDouble=2, // double
  ftFixed=3, //     v 
  ftText=4,  // (1-  -  ,
             //v - v   ASCII. T
             //   )
  ftStrucNum=5,//  -  (1-  -
               //   , v -
               //  )
  ftFloat= 6, // float
  ftNull=7, //  
  ftCoord=8, //  - 8  (1-
             // - v (int), 2-  - v
             //(int), 3  4-  - v (float))
  ftComplex=10 //   
)

/*
TFeatCode struc
  byte X //??? = 
  byte CodeCnt
  array[((@.CodeCnt-1)when(@.CodeCnt>0))exc 0]of byte:displ=(ShowArray(@,(INT(@),'.'))) Code
  align 2 AlCode
ends
*/

//- , v    
//  v  
TFeatCode struc
  word CntAnd1
  array[@.CntAnd1 shr 9]of Word Code
ends:displ=(Int(@.CntAnd1 shr 8),':',Int(@.CntAnd1 and 0xFF),'.',
  ShowArray(@.Code,(INT(@ shr 8),'.',INT(@ and 0xFF),'.')))

type bit
  TBit1 num+(1)
  TBit8 num+(8)
  TBit11 num+(11)
  TBit20 num+(20)
  TBit23 num+(23)
  TDoubleHi struc
    TBit20 M
    TBit11 P
    TBit1 S //Sign 1->Neg
  ends

  TFloat struc
    TBit23 M
    TBit8 P
    TBit1 S //Sign 1->Neg
  ends: displ=(@.S,' 1.',HEX(@.M*2,6),'*2^',INT(@.P-0x7F));

type
  TDouble struc
    ulong Lo
    TDoubleHi Hi
  ends: displ=(@.Hi.S,' 1.',HEX(@.Hi.M,5),HEX(@.Lo,8),'*2^',INT(@.Hi.P-0x3FF));

  TFixed struc
    int Hi
    word Lo
  ends: displ=(INT(@.Hi),'.',HEX(@.Lo))

  TText struc
    str V
    align 2 Al
  ends

  TStrucNum struc
    int Cnt
    array[@.Cnt/*??? -  -1*/] of int:displ=(ShowArray(@,(@,'.'))) V
  ends

  TGeoCoord struc
    int Deg //1-  - v (int)
    int Min //2-  - v (int)
    TFloat Sec //3  4-  - v (float))
  ends
  
  TMCoord struc
   // int X
   // int Y
    word X
    word Y
  ends

/*
  TComplexFeatVal struc
    word Sz
    raw[] VRest
  ends:[@:Size=(@.Sz+1)*2]
*/

type

TFeatures forward

TFeature struc
  word LX //   
  byte T //   (0,1,2,3)
  TFeatureType ITP //  :
  TFeatCode Code
  case @.ITP of
    ftInt: int
    ftDouble: TDouble
    ftFixed: TFixed
    ftText: TText
    ftStrucNum: TStrucNum
    ftFloat: TFloat
    ftNull: void
    ftCoord: TGeoCoord
    ftComplex: TFeatures//TComplexFeatVal
  endc V //(i+1) - l -    (  )
  array[@.T]of TMCoord LP //(l+1) - n -  v   (  )
  raw[] rest
ends:[@:Size=@.LX*2] //:assert[@.LX>0]

/*
TFeatureX try
  F: TFeature
  Z: word
endt
*/

PFeatures(Base) ^TFeatures near=word REF=@*2+@:Base;
TFeatures struc
  word LX //     
          // (       )
  array of TFeature:[@:Size=@@.LX*2] Tbl
ends

PLinks(Base) ^TLinks near=word REF=@*2+@:Base;

TLink struc
  word LS  //O -      ( LS v)
  int KLS //1 -  ,  v  v 
          //  v      
          //   v 𪹸 (1 - 32767). +
          // KLS=0,      p   
  TObjCode Code //2 - 10 -   
  int Num //11 -   
  int Rsrv//12 -  0
  ulong LogS //13,14 -   
  TFeatures LSF //15 -  ,   ,  0  .15
ends:[@:Size=@.LS*2]

TLinks struc
  word KS // O -  
  array[@.KS] of TLink Tbl // 1-  
ends

PIntrs(Base) ^TIntrs near=word REF=@*2+@:Base;

TIntr struc
  word LP  //O -  v    ( LP v)
  int KLP //1 -  v,  v  v   v
          // (1 - 32767) .  0,  ppv    p
          //        
          //    v 𪹸
  TObjCode Code //2 - 10 -  v 
  int Num //11 -  v 
  int hRefP //12 -     ,  
            //  v,  0
  TLogSIntr LogS //13,14 -   v
  TFeatures LP //15 -  ,   ,  0  .15
ends:[@:Size=@.LP*2]

TIntrs struc
  word KP // O -  v
  array[@.KP] of TIntr Tbl // 1- v 
ends

PMetrics(Base) ^TMetrics near=word REF=@*2+@:Base;
TMetrics struc
  word KM //    4     
          //   KM
  array[@.KM] of TMCoord Tbl
    //  p,  v  𦪸  
    //    ,    
    //  vv v   v  .
ends

PSquares(Base) ^TSquares near=word REF=@*2+@:Base;
TSquares struc //T  v  
  word KK //   (  4 )
  array[@.KK] of TMCoord Tbl //   4  
   //( )
ends

TObjectHdr(N) struc
  TRecTag Tag //0 -    ( 777)
  PFeatures(&@) AX  //1 -    ,  
           //  
  PLinks(&@) AS  //2 -    ,  
           //  
  PIntrs(&@) AP  //3 -    ,  
           //  v
  PSquares(&@) AK  //4 -    ,  
           //  
  PMetrics(&@) AM  //5 -    ,  
           //  
  int AccLvl //6 -     (  
           // -32768  +32767). , 
           //      
           // ,    
  TObjCode Code //7-15 -  
  int Num //16 -   (> 0  <=32767)
  TLogSObj LogS //17,18 -   
  PObjectRec(@:N+1,&@) Size //19,20 - 
//  ulong Size //19,20 - 
//  raw[] at &@; rest
ends:assert[@.Tag=TRecTag.Obj] //:[@:Size=@.Size*2]

TObjectRec(N) try
  H: TObjectHdr(@:N)
  Els: void
endt:autoname=('obj_',INT(@:N))

//TObjectTbl array of TObjectHdr ?@.Tag<>TrecTag.Obj!void;

data
0x04 TInfHead Hdr
//0x60 TObjectTbl ObjTbl
0x60 TObjectRec(0) Obj0


Other specifications.


FlexT home page, Author`s home page.