Documentation

vmap0read

Read Vector Map Level 0 file

Syntax

vmap0read
vmap0read(filepath,filename)
vmap0read(filepath,filename,recordIDs)
vmap0read(filepath,filename,recordIDs,field,varlen)
struc = vmap0read(...)
[struc,field] = vmap0read(...)
[struc,field,varlen] = vmap0read(...)
[struc,field,varlen,description] = vmap0read(...)
[struc,field,varlen,description,narrativefield] = vmap0read(...)

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.

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.

Examples

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

s = vmap0read('VMAP/VMAPLV0/NOAMER/','GRT')

s = 
                  id: 1
           data_type: 'GEO'
               units: 'M'
      ellipsoid_name: 'WGS 84'
    ellipsoid_detail: 'A=6378137 B=6356752 Meters'
     vert_datum_name: 'MEAN SEA LEVEL'
     vert_datum_code: '015'
    sound_datum_name: 'N/A'
    sound_datum_code: 'N/A'
      geo_datum_name: 'WGS 84'
      geo_datum_code: 'WGE'
     projection_name: 'Dec. Deg. (unproj.)'

s = vmap0read('VMAP/VMAPLV0/NOAMER/TRANS/','INT.VDT')

s = 
34x1 struct array with fields:
    id
    table
    attribute
    value
    description

s(1)

ans = 
             id: 1
          table: 'aerofacp.pft'
      attribute: 'use'
          value: 8
    description: 'Military'
s = vmap0read('VMAP/VMAPLV0/NOAMER/TRANS/','AEROFACP.PFT',1)

s = 
         id: 1
     f_code: 'GB005'
        iko: 'BGTL'
        nam: 'THULE AIR BASE'
        na3: 'GL52085'
        use: 8
        zv3: 77
    tile_id: 10
     end_id: 1

s = vmap0read('VMAP/VMAPLV0/NOAMER/TRANS/','AEROFACP.PFT',{1,2})

s = 
1x4424 struct array with fields:
    id
    f_code

More About

expand all

Tips

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 you can determine using the MATLAB® filesep function.

Was this topic helpful?