TIFFFormat
Summary
The TIFFFormat object represents a collection of Tagged Image File Format (TIFF) file properties that can be configured and used with the export method on the Layout, MapFrame, MapView, MapSeries and BookmarkMapSeries objects to create an output TIF file.
Discussion
TIFF files are the best choice for importing into image editing applications and are also a common GIS raster data format. However, they cannot be natively viewed by a web browser. TIFFs also support georeferencing information in GeoTIFF tags or in a separate world file for use as raster data.
The createExportFormat method can be used to create a TIFFFormat object if the format parameter is set to TIFF. The returned TIFFFormat object contains all the properties associated with a generating a TIFF file. These properties can be modified accordingly to produce different output results.
Properties
| Name | Explanation | Data type |
|---|---|---|
|
clipToElements (Read and Write) |
If set to |
Boolean |
|
colorMode (Read and Write) |
A string constant that represents the number of bits to describe color in a pixel. The default value is
Note:The available The |
String |
|
embedColorProfile (Read and Write) |
Include the color profile set for the map or layout in the exported file. This helps create consistency in colors when the file is viewed on different devices. If the profile is not embedded, or a non-color-managed viewer is used, the colors may be significantly different than what is seen on-screen. The default value is Note:This option is only available when color management is enabled. If color management is not enabled and the colorspace is set to CMYK, the CMYK colorspace is still included in the export. This may cause some colors to appear differently when viewing the exported file. |
Boolean |
|
filePath (Read and Write) |
A string that represents the system path and file name, including the extension, for the exported file. |
String |
|
geoReferenceMapFrame (Read and Write) |
The MapFrame used to control the coordinate system when the |
MapFrame |
|
geoTIFFTags (Read and Write) |
If set to Note:When exporting a layout, the GeoTIFF information needs to be based on a 2D map associated with the The |
Boolean |
|
height (Read and Write) |
The height, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
imageCompression (Read and Write) |
A string constant that represents the compression scheme used to compress image or raster data in the output file. The default value is
|
String |
|
imageCompressionQuality (Read and Write) |
The amount of image compression applied to the export. Low quality has a smaller file size but less clear data; max quality has a larger file size but crisper data. This only applies when certain compression types are used. The default value is |
Integer |
|
resolution (Read and Write) |
The effective dpi of the output vector data. The default value is 96. Note:When exporting a |
Integer |
|
showSelectionSymbology (Read and Write) |
Show selected features in the map or map frame as selected in the output file. Setting this value to |
Boolean |
|
threshold (Read and Write) |
Image intensities set above this value will appear white in the output file and all other values will appear black. This property is applied only when the |
Boolean |
|
transparentBackground (Read and Write) |
If set to |
Boolean |
|
width (Read and Write) |
The width, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
worldFile (Read and Write) |
If set to |
Boolean |
Methods
setColorMode(color_mode)
A string constant that represents the number of bits used to describe color.
The 32-BIT_CMYK_TRUE_COLOR and 40-BIT_CMYK_WITH_ALPHA options are only available if the layout or map
has a CMYK color model. Similarly, the 24-BIT_TRUE_COLOR and the 32-BIT_WITH_ALPHA options are only available if the layout or map
has a RGB color model.
| Name | Explanation | Data type |
|---|---|---|
|
color_mode |
Below is a list of valid strings.
Note:The available |
String |
setImageCompression(image_compression)
A string constant that represents the compression scheme used to compress image or raster data in the output file.
| Name | Explanation | Data type |
|---|---|---|
|
image_compression |
Below is a list of valid strings.
|
String |
Code sample
The following script exports a layout to TIFF format using default property values.
p = arcpy.mp.ArcGISProject('current')
lyt = p.listLayouts()[0]
tif = arcpy.mp.CreateExportFormat('TIFF', r'C:\Temp\Output.tif')
lyt.export(tif)