MetaData::WriteDBLayer()

Description

WriteDBLayer() is used to writes the metadata currently contained in the MetaData object to the specified layer of a database file.

Call Signature

WriteDBLayer ( int/string filespec, string layer_type, int layer_index )

Arguments

int/string filespec:

This can either be the handle returned by DBOpen(), or the name of an open file.

string layer_type:

The name of the type of layer. This is either "FIL" for the overall file, "IMG" for an image channel or one of the segment types listed in DBNextSeg().

int layer_index:

The channel, or segment number. Ignored if layer_type is "FIL".

Remarks

The previous metadata contents of the layer are removed.

Example


 local MetaData mdata
 call mdata.ReadDBLayer( file_spec, "IMG", 7 )

 call mdata.set( "Class_10_Desc", "Water" )

 call mdata.WriteDBLayer( file_spec, "IMG", 7 )

See also

MetaData class

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.