U.S. DEPARTMENT OF COMMERCE NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION NATIONAL ENVIRONMENTAL SATELLITE, DATA, AND INFORMATION SERVICE THE GEODAS 2-D VECTOR DATA FORMAT - "VCT00" Compiled By: Dan R. Metzger National Geophysical Data Center Boulder, Colorado August 2000 INTRODUCTION I GENERAL DESCRIPTION II HEADERS (Binary VCT00) III DATA RECORDS (Binary VCT00) IV DATA RECORDS (ASCII VCT00) V NGDC CONTACTS APPENDIX A I. INTRODUCTION During 2000 the Marine Geology & Geophysics Division of the National Geophysical Data Center undertook the development of software for coastline data. In doing so a generalized format for vector data was implemented. This format is geared toward coastline data, but can be used for other vector applications. II. GENERAL DESCRIPTION The VCT00 Format, is a digital format for the storage of 2-D vector data. Though developed for high resolution boundary (coastline) data, the format can handle other types of vector data. It is very utilitarian format and contains no documentation about the data (such as information about references, methods and datums used, etc.). Rather VCT00 formatted files only contain vector data records and headers with minimal geographic and file-indexing information. VCT00 formatted files can be either binary or ASCII. VCT00 binary files consist of a series of Header Records followed by Data Records. VCT00 ASCII files contain only the Data Records. The Binary VCT00 "physical records", both Header and Data, are 10 bytes each, and contain two signed 4-byte integers followed by one signed 2 byte integer. The Headers contain four of these physical records; the Data records consist of one record for each "point". Each Header represents a geographic box or "Block" containing a series of line segments. Each Header contains the "Address" (record number) where those data segments start in the file, the "Type" of data the segments represent, an optional "Value" for the data, the total Number of Points in the data segments, and the latitude/longitude limits of the Block of data. Data Records for both Binary and ASCII VCT00 files contain resolution information, so a single file can be plotted at several different resolutions, by sub-setting the data for different resolutions. The VCT00 format can be used for the exchange of 2-D vector data, using virtually any media type. The National Geophysical Data Center uses CD/DVD disks as its chief method of distribution of these data. III. HEADERS (Binary VCT00) The purpose of each binary Header is to locate and describe the vector data which it (geographically) encompasses. Each VCT00 Header is 40 bytes in length and consists of 4 10- byte records, each of which contains two signed 4-byte integers followed by one signed 2 byte integer. The Header records are all together at the start of the file. The last Header Record is an "empty" Header. This indicates that there are no more Headers. Data records immediately follow this Header. The following is a detailed description of the Header fields FIELD NAME NUMBER TYPE DESCRIPTION ________________________________________________________ Address of Data 4 Byte Integer File record number of the first point of the vector data which the Header represents. Record numbers start at 1 and are10 bytes each. Number of Records 4 Byte Integer Total number of points (vertices) represented by this Header Type of Data 2 Byte Integer For delineating different types of vector data. e.g. for geographic boundary data, 1=coastlines 2=primary international boundaries, 3= secondary boundaries such as US states, etc. A Type of -1 is used for the last (no records) Block of the file. Data Attribute 4 Byte Integer A value can be or Value attached to the data which the Header represents. E.g. for toptographic contours, this could represent a contour value for all the contours in this Header. Unused 4 Byte Integer Unused at this time. Unused 2 Byte Integer Unused at this time. Upper Left 4 Byte Integer Topmost Latitude of Latitude this Header block, in millionths of degrees (decimal degrees times 1,000,000). Upper Left 4 Byte Integer Leftmost Longitude of Longitude this Header block, in millionths of degrees. Unused 2 Byte Integer Unused at this time. Lower Right 4 Byte Integer Bottommost Latitude Latitude of this Header block, in millionths of degrees. Lower Right 4 Byte Integer Rightmost Longitude Longitude of this Header block, in millionths of degrees. Unused 2 Byte Integer Unused at this time. IV. DATA (Binary VCT00) The binary VCT00 Headers are followed immediately by the binary vector data records. The data records for a specific Header can only be delineated by the information in the Header record. The data records for a specific Header are broken up into a number of line segments. The "Pencode" field is used to determine extent of these line segments. The Type, (optional) Value and number of points of the line segment data for a particular Header are described in the Header Record. The data records are 10 bytes and each record contains two signed 4-byte integers followed by one signed 2 byte integer. The plotting instructions (MoveTo or LineTo) are contained within the Pencode Field. The Pencode also contains resolution information. Each Non-Zero pencode value is evenly divisible by a number of Resolution Values, meaning that the lat/lon point "belongs" to those particular resolutions. This Resolution Value is one of the first 7 prime numbers, the value of which increases with lower Resolution. To plot at a particular resolution you would only plot those points which have a Pencode which is evenly divisible by your particular Resolution Value. For full resolution this Resolution Value would be 1. The remaining Resolution Values increase through the Prime Numbers as the desired resolution decreases (i.e. 2, 3, 5, 7, 11, 13). Thus a simple Modulus Function can be used to determine whether to plot specific point. The usable resolutions can be thought of as Full, High, Medium-High, Medium, Medium-Low, Low, Crude. The following is a detailed description of the Binary Data Record fields FIELD NAME NUMBER TYPE DESCRIPTION ________________________________________________________ Latitude 4 Byte Integer Latitude of the point, in millionths of degrees (decimal degrees times 1,000,000). Longitude 4 Byte Integer Longitude of the point, in millionths of degrees. Pencode 2 Byte Integer Delineates the flow of the segments: 0 - Start, MoveTo Pt (Pen up Move) 1 - Full Res, LineTo Pt (Pen Down Move) Factor of 2 - Second Level Res LineTo Pt Factor of 3 - Third Level Res LineTo Pt Factor of 5 - Fourth Level Res LineTo Pt etc. V. DATA (ASCII VCT00) ASCII VCT00 data files do not contain Headers. The ASCII VCT00 files are simply as series of records, broken up into line segments according to the pencode. The data records are 28 ASCII characters in fixed fields, plus computer's end-of-record indicator. There will always be at least one space between fields, allowing the data to be input as space- delimited data. Decimal points for latitude and longitude are explicit. The plotting instructions (MoveTo or LineTo) are contained within the Pencode Field. The Pencode also contains resolution information. Each Non-Zero pencode value is evenly divisible by a number of Resolution Values, meaning that the lat/lon point "belongs" to those particular resolutions. This Resolution Value is one of the first 7 prime numbers, the value of which increases with lower Resolution. To plot at a particular resolution you would only plot those points which have a Pencode which is evenly divisible by your particular Resolution Value. For full resolution this Resolution Value would be 1. The remaining Resolution Values increase through the Prime Numbers as the desired resolution decreases (i.e. 2, 3, 5, 7, 11, 13). Thus a simple Modulus Function can be used to determine whether to plot specific point. The usable resolutions can be thought of as Full, High, Medium-High, Medium, Medium-Low, Low, Crude. The following is a detailed description of the ASCII Data Record fields FIELD NAME NUMBER OF BYTES DESCRIPTION ________________________________________________________ Longitude 11 Longitude of the point, with precision up to 6 decimals. Latitude 11 Latitude of the point, with precision up to 6 decimals. Pencode 6 Delineates the flow of the segments 0 - Start, MoveTo Pt (Pen up Move) 1 - Full Res, LineTo Pt (Pen Down Move) Factor of 2 - Second Level Res LineTo Pt Factor of 3 - Third Level Res LineTo Pt Factor of 5 - Fourth Level Res LineTo Pt etc. ----------------------------------------------------------------- APPENDIX A NGDC CONTACTS Dan R. Metzger: (303) 497-6542 Dan.R.Metzger@noaa.gov or David L. Divins (303) 497-6505 David.Divins@noaa.gov National Geophysical Data Center NOAA, E/GC3 325 Broadway Boulder, CO 80305-3328 TELEX 592811 NOAA MASC BDR FAX (303) 497-6513 ____________________________________________________________