TIFFFormat
Resumen
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.
Debate
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.
Propiedades
| Nombre | Explicación | Tipo de datos |
|---|---|---|
|
clipToElements (Lectura y escritura) |
If set to |
Boolean |
|
colorMode (Lectura y escritura) |
A string constant that represents the number of bits to describe color in a pixel. The default value is
Nota:The available The |
String |
|
embedColorProfile (Lectura y escritura) |
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 Nota: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 (Lectura y escritura) |
A string that represents the system path and file name, including the extension, for the exported file. |
String |
|
geoReferenceMapFrame (Lectura y escritura) |
The MapFrame used to control the coordinate system when the |
MapFrame |
|
geoTIFFTags (Lectura y escritura) |
If set to Nota:When exporting a layout, the GeoTIFF information needs to be based on a 2D map associated with the The |
Boolean |
|
height (Lectura y escritura) |
The height, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
imageCompression (Lectura y escritura) |
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 (Lectura y escritura) |
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 (Lectura y escritura) |
The effective dpi of the output vector data. The default value is 96. Nota:When exporting a |
Integer |
|
showSelectionSymbology (Lectura y escritura) |
Show selected features in the map or map frame as selected in the output file. Setting this value to |
Boolean |
|
threshold (Lectura y escritura) |
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 (Lectura y escritura) |
If set to |
Boolean |
|
width (Lectura y escritura) |
The width, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
worldFile (Lectura y escritura) |
If set to |
Boolean |
Métodos
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.
| Nombre | Explicación | Tipo de datos |
|---|---|---|
|
color_mode |
Below is a list of valid strings.
Nota: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.
| Nombre | Explicación | Tipo de datos |
|---|---|---|
|
image_compression |
Below is a list of valid strings.
|
String |
Muestra de código
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)