procedure ddfopen: open DDF file procedure ddfread: read DDF record procedure ddfclose: close DDF file
link ddfread
August 2, 2001; Gregg M. Townsend
This file is in the public domain.
These procedures read DDF files ("Data Descriptive Files", ISO standard 8211) such as those specified by the US Geological Survey's "Spatial Data Transfer Standard" for digital maps. ISO8211 files from other sources may contain additional data encodings not recognized by these procedures. ddfopen(filename) opens a file and returns a handle. ddfdda(handle) returns a list of header records. ddfread(handle) reads the next data record. ddfclose(handle) closes the file. ____________________________________________________________ ddfopen(filename) opens a DDF file, decodes the header, and returns an opaque handle for use with subsequent calls. It fails if any problems are encountered. Instead of a filename, an already-open file can be supplied. ____________________________________________________________ ddfdda(handle) returns a list of records containing data from the Data Descriptive Area (DDA) of the file header. Each record contains the following fields: tag DDR entry tag control field control data name field name labels list of field labels format data format The records may also contain other fields used internally. ____________________________________________________________ ddfread(handle) reads the next data record from the file. It returns a list of lists, with each sublist containing a tag name followed by the associated data values, already decoded according to the specification given in the header. ____________________________________________________________ ddfclose(handle) closes a DDF file.