📄 arc-info binary coverage files format.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0049)http://avce00.maptools.org/docs/v7_bin_cover.html -->
<HTML><HEAD><TITLE>Arc/Info Binary Coverage Files Format</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<CENTER>
<H1>Arc/Info Binary Coverage Format Analysis</H1></CENTER>
<P>
<CENTER>Last Update: 2006-06-14, <I>Daniel Morissette, <A
href="mailto:dmorissette@mapgears.com">dmorissette@mapgears.com</A></I></CENTER>
<P>
<HR width="50%">
<P>
<H2>TABLE OF CONTENTS</H2>
<P>
<UL>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#INTRO">1.
Introduction</A>
<UL>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#VARIANTS">1.1
PC Arc/Info and other variants
<LI><A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#BYTE_ORDER">1.2 Byte
Ordering</A> </LI></UL>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#ARC_COVER">2.
ARC Coverage Files</A>
<UL>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#ARC">2.1 File
Header</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#ARC">2.2
Index Files</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#ARC">2.3
ARC</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#PAL">2.4
PAL</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#LAB">2.5
LAB</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#CNT">2.6
CNT</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#PRJ">2.7
PRJ</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#LOG">2.8
LOG</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#TOL">2.9
TOL</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#TX6">2.10
TX6/TX7 Annotations</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#TXT">2.11 TXT
Annotations</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#RXP">2.12 RXP
- Specific to Region coverages</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#RPL">2.13 RPL
- Specific to Region coverages</A> </LI></UL>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#INFO_FILES">3.
The Attribute Files</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#INFO_V7">3.1
INFO Files in V7.x Coverages</A>
<UL>
<LI><A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#ARC.DIR">3.1.1
INFO/ARC.DIR</A>
<LI><A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#ARC.DAT">3.1.2
INFO/ARC####.DAT</A>
<LI><A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#ARC.NIT">3.1.3
INFO/ARC####.NIT</A>
<LI><A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#INFO_DATA">3.1.4
Table Data files (.adf, ...)</A>
<LI><A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#TABLE_NAME">3.1.5
Name and location of TABLE DATA files</A> </LI></UL>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#INFO_WEIRD">3.2
INFO Files in "Weird" Coverages</A>
<LI><A href="http://avce00.maptools.org/docs/v7_bin_cover.html#DBF_PC">3.3 DBF
Files in PC Coverages</A> </LI></UL>
<P>
<P>
<H2><A name=INTRO>1. INTRODUCTION</A></H2>
<P>This is an attempt to document the binary vector coverage files used by
Arc/Info V7.x for Unix and Windows NT. Since the coverage file's format is not
documented by ESRI, this document is mainly based on the analysis of binary
dumps of the files... this implies that the information may be incomplete (or
even inaccurate!) in some cases. As for any document of this type, it is
expected that it will evolve as we learn more.
<P>Another great source of information to help understanding the format would be
the (world famous) "ANALYSIS OF ARC EXPORT FILE FORMAT FOR ARC/INFO (REV 6.1.1)"
(from which I "borrowed" some extracts ;-)... you can find it at:
<P>
<CENTER><A
href="http://www.geocities.com/~vmushinskiy/fformats/files/e00.txt">http://www.geocities.com/~vmushinskiy/fformats/files/e00.txt</A>
</CENTER>
<P>Since the contents of the E00 and binary coverage files are very close, the
current document will often refer you to an <A
href="http://avce00.maptools.org/docs/v7_e00_cover.html">updated version of the
E00 Analysis Document mentioned above</A> instead of duplicating the details
about a specific file.
<P>The first section of this document covers the coverage vector files (ARC,
PAL, CNT, LAB, ...) and the second section covers the INFO files.
<P>
<P>
<H3><A name=VARIANTS>1.1 PC ARC/INFO COVERAGES AND VARIANTS</A></H3>
<P>Even though this document covers mainly Arc/Info V7.x for Unix coverages,
some notes have been included to document the differences between the V7.x Unix
coverages and some variants.
<P>In each section, the Unix V7.x coverage format is always discussed first
(sometimes referred to as <B>"V7 Coverages"</B>), and when applicable, the
following variants will also be discussed:
<P>
<UL>
<LI><B>"PC Coverages V1"</B>: Coverages produced by the 16 bits version of
Arc/Info for PCs (DOS or Windows?).
<P></P>
<LI><B>"PC Coverages V2"</B>: Look like an hybrid between PC Coverages V1 and
V7.x Coverages. Probably produced on Unix systems with Motorola byte ordering.
They use DBF files for the info tables (located in the coverage directory)
just like PC Coverages V1, but use .adf files for the other files like V7.x
Coverages. They also use the same byte ordering as V7.x Coverages.
<P></P>
<LI><B>"Weird Coverages"</B>: Refers to some kind of hybrid between V7 and PC
coverages. Probably produced by an early version of Arc/Info for Unix.
<BR>These coverages use the same byte ordering as V7 Coverages.<BR>The
attribute files in these coverages are located in an INFO directory and have
names similar (but not identical) to V7 Coverages. The coverage files (ARC,
PAL, etc.) are named the same way as in PC Coverages, but they do not have the
first 256 bytes header of PC Coverages and they are not padded to a multiple
of 256 bytes at the end.<BR>The name "Weird coverages" refers to our reaction
when we saw those coverages for the first time. <CODE>;-)</CODE> </LI></UL>
<P>
<H3><A name=BYTE_ORDER>1.2 BYTE ORDERING</A></H3>
<P><B>V7.x Coverages</B> always use MSB-First (Motorola) byte ordering for both
the ARC coverage files and the INFO tables. This is true even for coverages
produced by Arc/Info V7.x for Windows NT on an Intel platform.
<P><B>PC Arc/Info coverages V1</B> always use LSB-First (Intel) byte ordering.
<P><B>PC Arc/Info coverages V2</B> always use MSB-First (Motorola) byte
ordering.
<P>The <B>Weird coverages</B> use MSB-First (Motorola) byte ordering (Same as V7
Coverages).
<P>
<HR width="50%">
<P>
<H2><A name=ARC_COVER>2. ARC COVERAGE FILES</A></H2>
<P>All the vector (ARC) coverage files are stored in the same directory. The
name of this directory is the name of the coverage.
<P>The name of the coverage directory (and thus the name of the coverage)
appears to be limited to 13 characters.
<P>
<H3><A name=Header>2.1 File Header</A></H3>
<P>
<UL>
<P>
<H3><A name=Header_V7>2.1.1 V7.x Coverage File Header</A></H3>
<P>Most of these files have a 100 bytes header:
<P><PRE> Bytes Type Description
0-3 int32 Signature - Constant for a given file type
4-7 int32 Precision - Usually > 0 for single precision,
and < 0 for double precision, but
there are exceptions.
8-11 int32 Record size, for files with fixed size records
(or 0 for variable length records)
12-23 All zeros
24-27 int32 File size (in 2 byte words), including header size
28-99 All zeros
</PRE>
<P>
<P>
<H3><A name=Header_PC>2.1.2 PC Coverage File Header</A></H3>
<P><B>PC Coverages V1</B> first start with a 256 bytes header, followed by the
100 bytes header described above, for a total of 356 bytes of header. All the
files that have this 256 bytes header have an actual size which is a multiple
of 256 bytes, padded with junk at the end. So it is very important to take the
size specified in the header into account when reading these files.
<P>Here is what we find in this 256 bytes header specific to PC coverages:
<P><PRE> Bytes Type Description
0-1 int16 Signature ??? 0x0400 or 0x0000
2-5 int32 File size (in 2 byte words), including the 100 bytes
header size, but not including this 256 bytes header.
This same value will be repeated in bytes 24-27 of
the 100 bytes header.
6-255 All zeros
</PRE>
<P>Also note that PC Coverages are ALWAYS SINGLE PRECISION, no matter what the
value in bytes 4-7 in the 100 bytes header is. (i.e. The preccision flag value
is sometimes negative, but the data is really always single precision.)
<P>
<H3><A name=Header_WEIRD>2.1.3 PC V2 and Weird Coverage File Header</A></H3>
<P><B>PC V2 and Weird Coverages</B> have only one 100 bytes header, just like
V7 Coverages.
<P>These coverages can exist in both single and double precision form.
<P></P></UL>
<P>
<H3><A name=Index>2.2 Index files</A></H3>
<P>
<UL>The files that contain variable length records (i.e. ARC, PAL, CNT, etc.)
are accompanied by an index file. The name of the index file (when present)
will be specified in the documentation for each file type below.
<P>All index files have the same 100 bytes header as the file that they
correspond to (it is identical, except for the size value at byte 24).
<P>Then starting at byte 100 in the file, you have one index entry for each
object from the master file:
<P><PRE> Bytes Type Description
0-3 int32 Start position of the record in the file. This
value is the number of 2 byte words from the beginning
of the file. So the position for the first object
is always 50.
4-7 int32 Record length, excluding the first 8 bytes of the
record (number of 2 byte words - 4). This value
is the same value that we usually find at byte 4 in
the corresponding object record. See
</PRE>
<P><B>PC Coverage V1</B> index files start with the <A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#Header_PC">256 bytes
header</A> followed by the usual 100 bytes header, followed by index entries.
<P><B>PC Coverage V2</B> index files are identical to V7 indexes.
<P><B>Weird Coverage</B> index files are identical to V7 indexes, except that
they have a different filename. </P></UL>
<P>
<H3><A name=ARC>2.3 ARC.ADF</A></H3>
<P>
<UL>The "arc.adf" file contains the arcs definitions and their vertices.
<P>It comes with an <A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#Index">index file</A>
called "arx.adf".
<P>
<H3><A name=ARC_V7>2.3.1 ARC.ADF file in V7.x Coverages</A></H3>
<P>The file starts with the usual 100 bytes header:
<P><PRE> Bytes Type Description
0-3 int32 Signature - 9994
4-7 int32 Precision - +1 for single precision,
and -1 for double precision.
8-11 int32 Record size (always 0: variable length records)
12-23 All zeros
24-27 int32 File size (in 2 byte words), including header size
28-99 All zeros
</PRE>
<P>Then variable length arc records follow:
<P><PRE> Bytes Type Description
0-3 int32 Arc_Id
4-7 int32 Record length, number of 2 byte words that follow
the current value. (= (12 + size of vertices list)/2)
7-11 int32 Arc_UserId
12-15 int32 From_Node
16-19 int32 To_Node
20-23 int32 Left_Poly
24-27 int32 Right_Poly
28-31 int32 Num_Vertices
32+ Vertices list (see below)
</PRE>
<P>The the vertices follow (Num_Vertices pairs of x,y values).
<P>For SINGLE PRECISION:
<P><PRE> Bytes Type Description
32-35 float x1
36-39 float y1
40-43 float x2 ...
44-47 float y2 ...
...
...
</PRE>
<P>For DOUBLE PRECISION:
<P><PRE> Bytes Type Description
32-39 double x1
40-47 double y1
48-55 double x2 ...
56-63 double y2 ...
...
...
</PRE>
<P>
<H3><A name=ARC_PC>2.3.2 ARC file in PC Coverages V1</A></H3>
<P>In PC Coverages V1, the main file is called "ARC" and the index "ARX".
<P>They both start with the <A
href="http://avce00.maptools.org/docs/v7_bin_cover.html#Header_PC">256 bytes
header</A> specific to PC Coverages, followed by the 100 bytes header and the
data records as described above.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -