Mapping Toolbox    
dcwread

Read a Digital Chart of the World file

Syntax

Background

The Digital Chart of the World (DCW) uses binary files in a variety of formats. This function determines the format of the file and returns the contents in a structure. The field names of this structure are the same as the field names in the DCW file.

Description

dcwread reads a DCW file. The user selects the file interactively.

dcwread(filepath,filename) reads the specified file. The combination [filepath filename] must form a valid complete filename.

dcwread(filepath,filename,recordIDs) reads selected records or fields from the file. If recordIDs is a scalar or a vector of integers, the function returns the selected records. If recordIDs is a cellarray of integers, all records of the associated fields are returned.

dcwread(filepath,filename,recordIDs,field,varlen) uses previously read field and variable length record information to skip parsing the file header (see below).

struc = dcwread(...) returns the file contents in a structure.

[struc,field] = dcwread(...) returns the file contents and a structure describing the format of the file.

[struc,field,varlen] = dcwread(...) also returns a vector describing which fields have variable length records.

[struc,field,varlen,description] = dcwread(...) also returns a string describing the contents of the file.

[struc,field,varlen,description,narrativefield] = dcwread(...) also returns the name of the narrative file for the current file.

Remarks

This function reads all DCW files except index files (files with names ending in 'X'), thematic index files (files with names ending in 'TI'), and spatial index files (files with names ending in 'SI').

File separators are platform dependent. The filepath input must use appropriate file separators, which can be determined using the MATLAB filesep function.

Examples

The following examples use the Macintosh directory system and file separators for the pathname:

See Also
dcwdata
Read selected data from the Digital Chart of the World
dcwgaz
Search for entries in the Digital Chart of the World gazette
dcwrhead
Read a Digital Chart of the World file header


  dcwgaz dcwrhead