ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Hilfe
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Die Mapping-Plattform für Ihre Organisation

ArcGIS Desktop

Ein vollständiges professionelles GIS

ArcGIS Enterprise

GIS in Ihrem Unternehmen

ArcGIS Developers

Werkzeuge zum Erstellen standortbezogener Apps

ArcGIS Solutions

Kostenlose Karten- und App-Vorlagen für Ihre Branche

ArcGIS Marketplace

Rufen Sie Apps und Daten für Ihre Organisation ab.

  • Dokumentation
  • Support
Esri
  • Anmelden
user
  • Eigenes Profil
  • Abmelden

ArcMap

  • Startseite
  • Erste Schritte
  • Karte
  • Analysieren
  • Verwalten von Daten
  • Werkzeuge
  • Erweiterungen

ExportToLayoutGeoTIFF

Mit der Production Mapping-Lizenz verfügbar.

  • Zusammenfassung
  • Auswertung
  • Syntax
  • Codebeispiel

Zusammenfassung

Exports the page layout of an .mxd file to the Tagged Image File Format (TIFF) with spatial reference information, which is also known as a GeoTIFF.

Auswertung

TIFF files are the most versatile raster format. TIFFs can store pixel data at several bit depths and can be compressed with either lossy or lossless compression techniques depending on file size and accuracy requirements.

Refer to Exporting to Layout GeoTIFF in ArcGIS Desktop Help for more detailed discussions on exporting maps.

Hinweis:

File sizes can differ when map documents are exported using arcpyproduction.mapping instead of the ArcMap commands. This is due to the differences in the functions in the Python module versus the commands in ArcMap.

Hinweis:

The world file is not automatically created as it is when the .mxd is exported to a GeoTIFF in ArcMap. To generate this file, set the world_file parameter to True.

Syntax

ExportToLayoutGeoTIFF (map_document, out_tiff, {spatial_reference_data_frame}, {resolution}, {world_file}, {color_mode}, {tiff_compression})
ParameterErklärungDatentyp
map_document

A variable that references a MapDocument object.

MapDocument
out_tiff

A string that represents the path and file name for the output export file.

String
spatial_reference_data_frame

The data frame used to interpolate the spatial reference. By default, the active data frame is used to determine the spatial reference for the TIFF.

DataFrame
resolution

A number that defines the resolution of the export file in DPI (dots per inch).

(Der Standardwert ist 96)

Integer
world_file

If set to True, a georeferenced world file is created. The file contains pixel scale information and real-world coordinate information.

(Der Standardwert ist False)

Boolean
color_mode

This value specifies the number of bits used to describe color.

  • 24-BIT_TRUE_COLOR —24-bit true color
  • 8-BIT_PALETTE —8-bit palette
  • 8-BIT_GRAYSCALE —8-bit grayscale
  • 1-BIT_MONOCHROME_MASK —1-bit monochrome mask
  • 1-BIT_MONOCHROME_THRESHOLD —1-bit monochrome threshold

(Der Standardwert ist 24-BIT_TRUE_COLOR)

String
tiff_compression

This value represents a compression scheme.

  • DEFLATE —A lossless data compression.
  • JPEG —JPEG compression.
  • LZW —Lempel-Ziv-Welch, a lossless data compression. This is the default value.
  • NONE —Compression is not applied.
  • PACK_BITS —Pack bits compression.

(Der Standardwert ist LZW)

String

Codebeispiel

ExportToLayoutGeoTIFF example 1

This script exports the map to a GeoTIFF. The Main data frame is used to obtain the spatial reference information.

import arcpy
import arcpyproduction

# Check out Production Mapping extension
arcpy.CheckOutExtension("foundation")

# Define variables
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
out_tiff = r"C:\Project\GeoTIFFs\Project.tif"
df = arcpy.mapping.ListDataFrames(mxd, "Main")[0]

# Run function with only the required parameters defined
arcpyproduction.mapping.ExportToLayoutGeoTIFF(mxd, out_tiff, df, world_file="True")

# Check in extension
arcpy.CheckInExtension('foundation')
ExportToLayoutGeoTIFF example 2

This script exports a map document with multiple data frames, each of which has a different spatial reference. One GeoTIFF is created for each data frame, and the name of the output GeoTIFF is based on the data frame name.

import os
import arcpy
import arcpyproduction

# Check out Production Mapping extension
arcpy.CheckOutExtension("foundation")

# Define variables
mxd = arcpy.mapping.MapDocument(r"C:\Project\MXDs\Project2.mxd")
out_dir = r"C:\Project\GeoTIFFs"

# Export each data frame as a separate GeoTIFF
for df in arcpy.mapping.ListDataFrames(mxd):
    out_tiff = os.path.join(out_dir, df.name + ".tiff")
    arcpyproduction.mapping.ExportToLayoutGeoTIFF(mxd, out_tiff, df)

# Check in extension
arcpy.CheckInExtension('foundation')

Verwandte Themen

  • Exporting to Layout GeoTIFF
  • Introduction to arcpyproduction.mapping

ArcGIS Desktop

  • Startseite
  • Dokumentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Über Esri

  • Über uns
  • Karriere
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Wir sind an Ihrer Meinung interessiert.
Copyright © 2021 Esri. | Datenschutz | Rechtliches