mapscript.outputFormatObj

class mapscript.outputFormatObj(driver: char const, name: char = None)

The OUTPUTFORMAT object

Overview

The outputFormatObj has the following relationships:

../../../_images/outputFormatObj_mapObj.png

Attributes

bands

int The number of bands in the raster, normally set via the BAND_COUNT formatoption - this field should be considered read-only Only used for the "raw" modes, MS_IMAGEMODE_BYTE, MS_IMAGEMODE_INT16, and MS_IMAGEMODE_FLOAT32

driver

char See DRIVER

extension

char See EXTENSION

imagemode

int An Image mode constant - see IMAGEMODE

inmapfile

int Boolean value indicating if the format is in the Mapfile

mimetype

char See MIMETYPE

name

char See NAME

numformatoptions

int immutable The number of option values set on this format - can be used to iterate over the options array in conjunction with outputFormatObj.getOptionAt()

renderer

int A render mode constant - normally set internally based on the driver and some other setting in the constructor.

thisown

The membership flag

transparent

int See TRANSPARENT

Methods

__init__(driver: char const, name: char = None)[burim]

Create new instance. If name is not provided, the value of driver is used as a name.

attachDevice(device: void) void[burim]

Set the device property of the output format

getOption(*args) char[burim]

Return the format option at key or defaultvalue if key is not a valid hash index.

getOptionAt(i: int) char[burim]

Returns the option at idx or NULL if the index is beyond the array bounds. The option is returned as the original KEY=VALUE string. The number of available options can be obtained via outputFormatObj.numformatoptions

setExtension(extension: char const) void[burim]

Set file extension for output format such as ‹png› or ‹jpg›. Method could probably be deprecated since the extension attribute is mutable. Not in Java extension.

setMimetype(mimetype: char const) void[burim]

Set mimetype for output format such as image/png or image/jpeg. Method could probably be deprecated since the mimetype attribute is mutable. Not in Java extension

setOption(key: char const, value: char const) void[burim]

Set the format option at key to value. Format options are mostly driver specific.

validate() int[burim]

Checks some internal consistency issues, and returns MS_TRUE if things are OK and MS_FALSE if there are problems. Some problems are fixed up internally. May produce debug output if issues encountered.