mapscript.symbolSetObj

class mapscript.symbolSetObj(symbolfile: char const = None)

A symbolSetObj is an attribute of a mapObj and is associated with instances of symbolObj.

Overview

The symbolSetObj has the following relationships:

../../../_images/symbolSetObj_symbolObj.png

Attributes

filename

char Symbolset filename

imagecachesize

int Symbols in the cache

maxsymbols

int immutable Maximum number of allowed symbols

numsymbols

int immutable Number of symbols in the set

thisown

The membership flag

Methods

__init__(symbolfile: char const = None)[исходный код]

Create new symbolSetObj instance. If symbolfile is specified, symbols will be loaded from the file.

appendSymbol(symbol: symbolObj) int[исходный код]

Add a copy of symbol to the symbolset and return its index.

getSymbol(i: int) symbolObj[исходный код]

Returns a reference to the symbol at index.

getSymbolByName(symbolname: char) symbolObj[исходный код]

Returns a reference to the symbol named name.

index(symbolname: char) int[исходный код]

Return the index of the symbol named name or -1 in the case that no such symbol is found.

removeSymbol(index: int) symbolObj[исходный код]

Remove the symbol at index and return a copy of the symbol.

save(filename: char const) int[исходный код]

Save symbol set to a file. Returns MS_SUCCESS or MS_FAILURE