MAS

Modify database segment descriptors


EnvironmentsPYTHON :: EASI
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example

Back to top

Description


Modifies the segment name, segment description, georeferencing, GCP, or vector units, or any combination for a database segment.
Back to top

Parameters


mas(file, dbsl, dbsn, dbsd, mapunits)

Name Type Caption Length Value range
FILE * str Input file name 1 -    
DBSL * List[int] Input segment 1 - 1  
DBSN str Segment name 0 -    
DBSD str Segment description 0 -    
MAPUNITS str Map units 0 - 16 PIXEL | UTM | METER | LONG/LAT
Default: 

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies name of the PCIDSK file that contains the segment to modify.

DBSL

Specifies the number of the segment to modify. Only one segment number may be specified.

DBSN

Specifies the new name (up to 8 characters) to replace the existing segment name.

If this parameter is not specified, the existing segment name remains unchanged.

DBSD

Specifies a new segment description (up to 64 characters) to replace the existing segment description.

If this parameter is not specified, the existing segment description remains unchanged.

MAPUNITS

Specifies a new type of georeferencing, GCP, or vector units for an existing georeferencing, GCP, or vector segment.

If this parameter is not specified, the existing segment description remains unchanged.

This parameter is ignored if the segment type is not a georeferencing (type 150) GCP (type 213 or 214) or vector (type 116) segment.

MAPUNITS can specify the UTM grid zone number and row, and Earth model, as follows:

UTM mm r Ennn
where:

The Earth model can be specified for longitude and latitude (and other units except pixel) as follows:

LONG/LAT Ennn

For more information about how to specify a MAPUNITS string and for a list of supported Earth models, see Projections and Earth models in the Technical Reference section of the Online Help.

Back to top

Details

MAS modifies the segment name (DBSN), segment description (DBSN), and GCP or vector unit type (MAPUNITS), or both, for one specified database segment (DBSL). One or more of DBSN, DBSD, or MAPUNITS may be changed at the same time. If a parameter is not specified, its value in the database segment is not changed. At least one of DBSN, DBSD, or MAPUNITS must be specified.

MAS is the only algorithm that can change the segment name, segment descriptor, or units of an existing database segment. When a new segment is created by another algorithm, the DBSN, DBSD, MAPUNITS, or VECUNIT parameters specify the segment name, descriptor, and units. When data is written to an existing segment, the DBSN, DBSD, MAPUNITS, and VECUNIT parameters are ignored, regardless of whether or not they are specified. MAS must be used to change these values.

Back to top

Example

Modify the database segment descriptor on segment listing 6. Modify the segment descriptor and vector units for vector segment 25 on irvine.pix. Do not change the segment name (DLGTRANS).

from pci.mas import mas

file	=	r'/demo/irvine.pix'
dbsl	=	[25]
dbsn	=	''
dbsd	=	'Changed segment descriptor'
mapunits	=	'METER'

mas( file, dbsl, dbsn, dbsd, mapunits )

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