Mapping Toolbox    
vmap0read

Read a Digital Chart of the World file

Syntax

Background

The Vector Map level 0 (VMAP0) 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 VMAP0 file.

Description

vmap0read reads a VMAP0 file. The user selects the file interactively.

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

vmap0read(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 cell array of integers, all records of the associated fields are returned.

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

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

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

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

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

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

Remarks

This function reads all VMAP0 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 path name:

See Also
vmap0data
Read selected data from the VMAP0
vmap0rhead
Read a VMAP0 file header


  vmap0data vmap0rhead