env (arcpy)
Summary
Environment settings are exposed as properties on ArcPy's env class. These properties can be used to retrieve the current values or to set them. Geoprocessing environment settings can be thought of as additional parameters that affect a tool's results.
Properties
Property | Explanation | Data Type |
addOutputsToMap (Read and Write) | Set whether tools' resulting output datasets should be added to the application display. | Boolean |
autoCommit (Read and Write) | Tools that honor the Auto Commit environment will force a commit after the specified number of changes have been made within an ArcSDE transaction. Learn more about autoCommit | Long |
cartographicCoordinateSystem (Read and Write) | Tools that honor the Cartographic Coordinate System environment will use the specified coordinate system to determine the size, extent, and spatial relationships of features when making calculations. Learn more about cartographicCoordinateSystem | String |
cartographicPartitions (Read and Write) | Tools that honor the Cartographic Partitions environment will subdivide input features by the specified partition polygon features for sequential processing to avoid memory limitations that may otherwise be encountered with large datasets. Learn more about cartographicPartitions | String |
cellSize (Read and Write) | Tools that honor the Cell size environment setting set the output raster cell size, or resolution, for the operation. The default output resolution is determined by the coarsest of the input raster datasets. Learn more about cellSize | String |
coincidentPoints (Read and Write) | Tools that honor the Coincident Points environment define how coincident data is treated in Geostatistical Analyst. Learn more about coincidentPoints | String |
compression (Read and Write) | Tools that honor the Compression environment setting will set the compression type when storing output raster datasets. Learn more about compression | String |
configKeyword (Read and Write) | Tools that honor Output CONFIG Keyword will use the specified keyword when creating datasets in a geodatabase. Learn more about configKeyword | String |
derivedPrecision (Read and Write) | Tools that honor the Precision for Derived Coverages environment create output coverages whose precision is determined from the input coverages based on this setting. Learn more about derivedPrecision | String |
extent (Read and Write) | Tools that honor the Output Extent environment will only process features or rasters that fall within the extent specified in this setting. Learn more about extent | String |
geographicTransformations (Read and Write) | Tools that honor the Geographic Transformations environment will use the transformation methods when projecting data. Learn more about geographicTransformations | String |
maintainSpatialIndex (Read and Write) | Tools that honor the Maintain Spatial Index environment delete and re-create the spatial index of an ArcSDE feature class, or keep it in place and update it, according to the setting. Learn more about maintainSpatialIndex | Boolean |
mask (Read and Write) | Tools that honor the Mask environment will only consider those cells that fall within the analysis mask in the operation. Learn more about mask | String |
MDomain (Read and Write) | Tools that honor the Output M Domain environment will generate output datasets with the specified measure (m)-domain. Learn more about MDomain | String |
MResolution (Read and Write) | Tools that honor this environment will apply the M resolution to output geodatasets. Learn more about MResolution | Double |
newPrecision (Read and Write) | Tools that honor the Precision for New Coverages environment will create output coverages that have the specified precision. Learn more about newPrecision | String |
nodata (Read and Write) | Tools that honor the NoData environment setting will only process rasters where the NoData is valid. Learn more about nodata | String |
outputCoordinateSystem (Read and Write) | Tools that honor the Output Coordinate System environment will create output geodatasets with the specified coordinate system. Learn more about outputCoordinateSystem | String |
outputMFlag (Read and Write) | Tools that honor the Output has M Values environment will control whether the output geodataset will store M values. Learn more about outputMFlag | String |
outputZFlag (Read and Write) | Tools that honor the Output has Z Values environment will control whether the output geodataset will store z-values. Learn more about outputZFlag | String |
outputZValue (Read and Write) | Tools that honor this environment will set the z-coordinate for each output vertex that does not already have a z-coordinate. Learn more about outputZValue | String |
overwriteOutput (Read and Write) | Controls whether tools will automatically overwrite any existing output when run. When set to True, tools will execute and overwrite the output dataset. When set to False, existing outputs will not be overwritten, and the tool will return an error. | Boolean |
packageWorkspace (Read Only) | The Package Workspace is the location of a folder that locates the contents of a shared geoprocessing package or service. Learn more about packageWorkspace | String |
parallelProcessingFactor (Read and Write) | Tools that honor the Parallel Processing Factor environment will divide and perform operations across multiple processes. Learn more about parallelProcessingFactor. | Integer |
projectCompare (Read and Write) | Tools that honor the Level of Comparison Between Projection Files environment only execute if the input projections match to the degree that is specified. Learn more about projectCompare | String |
pyramid (Read and Write) | Tools that honor the Pyramid environment setting will only process rasters where the pyramids are valid. Pyramids for ERDAS IMAGINE files have limited options that can be set. Learn more about pyramid | String |
qualifiedFieldNames (Read and Write) | Tools that honor the Qualified Field Names environment will use this setting to distinguish between qualified or unqualified field names. Qualified field names are the names of fields in a feature class or table that have the name of the origin feature class or table appended onto the field name itself. This setting is relevant when working with joined data. Learn more about qualifiedFieldNames | Boolean |
randomGenerator (Read and Write) | Tools that use the Random Number Generator environment use algorithms that use the seed and distribution to produce a sequence of random numbers. Learn more about randomGenerator | Object |
rasterStatistics (Read and Write) | Tools that honor the Raster Statistics environment control how statistics are built for output raster datasets. Learn more about rasterStatistics | String |
referenceScale (Read and Write) | Tools that honor the Reference Scale environment will consider the graphical size and extent of symbolized features as they appear at the reference scale. Learn more about referenceScale | Double |
resamplingMethod (Read and Write) | Resampling is the process of interpolating the pixel values while transforming your raster dataset. This is used when the input and output do not line up exactly, when the pixel size changes, when the data is shifted, or a combination of these reasons. Learn more about resamplingMethod | String |
scratchFolder (Read Only) | The scratch folder is the location of a folder you can use to write file-based data, such as shapefiles, text files, and layer files. It is a read-only environment managed by ArcGIS. Learn more about scratchFolder | String |
scratchGDB (Read Only) | The scratch GDB is the location of a file geodatabase you can use to write temporary data. Learn more about scratchGDB | String |
scratchWorkspace (Read and Write) | Tools that honor the Scratch Workspace environment setting use the specified location as the default workspace for output datasets. The Scratch Workspace is intended for output data you do not wish to maintain. Learn more about scratchWorkspace | String |
snapRaster (Read and Write) | Tools that honor the Snap Raster environment will adjust the extent of output rasters so that they match the cell alignment of the specified snap raster. Learn more about snapRaster | String |
spatialGrid1 (Read and Write) | Tools that honor the Output Spatial Grid 1, 2, and 3 environments will create feature classes that have the specified spatial index grids if those feature classes support spatial index grids. Learn more about spatialGrid1 | Double |
spatialGrid2 (Read and Write) | Tools that honor the Output Spatial Grid 1, 2, and 3 environments will create feature classes that have the specified spatial index grids if those feature classes support spatial index grids. Learn more about spatialGrid2 | Double |
spatialGrid3 (Read and Write) | Tools that honor the Output Spatial Grid 1, 2, and 3 environments will create feature classes that have the specified spatial index grids if those feature classes support spatial index grids. Learn more about spatialGrid3 | Double |
terrainMemoryUsage (Read and Write) | Tools that honor the Terrain Memory Usage environment control memory use during analysis on terrains. Learn more about terrainMemoryUsage | Boolean |
tileSize (Read and Write) | Tools that honor the Tile Size environment set the tile size for rasters that are stored in blocks of data. Learn more about tileSize | String |
tinSaveVersion (Read and Write) | Tools that honor the TIN Storage Version setting will output TIN surfaces in the specified version. Learn more about tinSaveVersion | String |
transferDomains (Read and Write) | This geoprocessing environment controls whether output shapefiles and dBASE (.dbf) tables will have fields added containing domain and subtype descriptions, in addition to fields containing domain and subtype codes. This setting is only relevant when the input to a geoprocessing tool is a geodatabase feature class or table with domains and subtypes defined. By default, only domain and subtype codes are included in shapefile or dBASE (.dbf) output. Learn more about transferDomains | Boolean |
workspace (Read and Write) | Tools that honor the Current Workspace environment setting use the workspace specified as the default location for geoprocessing tool inputs and outputs. Learn more about currentWorkspace | String |
XYDomain (Read and Write) | Tools that honor the Output XY Domain environment will set the specified range to the output geodataset's x,y domain. Learn more about XYDomain | String |
XYResolution (Read and Write) | Tools that honor this environment will apply the x,y resolution to output geodatasets. Learn more about XYResolution | String |
XYTolerance (Read and Write) | Tools that honor this environment will override the default x,y tolerance on geodatasets created inside a geodatabase. Learn more about XYTolerance | String |
ZDomain (Read and Write) | Tools that honor the Output Z Domain environment will generate output datasets with the specified z-domain. Learn more about ZDomain | String |
ZResolution (Read and Write) | Tools that honor this environment will apply the z-resolution to output geodatasets. Learn more about ZResolution | String |
ZTolerance (Read and Write) | Tools that honor this environment will override the default z-tolerance on geodatasets created inside a geodatabase. Learn more about ZTolerance | String |