mapscript.outputFormatObj¶
- class mapscript.outputFormatObj(driver: char const, name: char = None)¶
The OUTPUTFORMAT object
Overview
The outputFormatObj has the following relationships:
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)[broncode]¶
Create new instance. If name is not provided, the value of driver is used as a name.
- attachDevice(device: void) void [broncode]¶
Set the device property of the output format
- getOption(*args) char [broncode]¶
Return the format option at
key
ordefaultvalue
if key is not a valid hash index.
- getOptionAt(i: int) char [broncode]¶
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 viaoutputFormatObj.numformatoptions
- setExtension(extension: char const) void [broncode]¶
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 [broncode]¶
Set mimetype for output format such as
image/png
orimage/jpeg
. Method could probably be deprecated since the mimetype attribute is mutable. Not in Java extension
- setOption(key: char const, value: char const) void [broncode]¶
Set the format option at
key
tovalue
. Format options are mostly driver specific.
- validate() int [broncode]¶
Checks some internal consistency issues, and returns
MS_TRUE
if things are OK andMS_FALSE
if there are problems. Some problems are fixed up internally. May produce debug output if issues encountered.