当前位置:网站首页>ArcGIS batch export layer script
ArcGIS batch export layer script
2022-06-26 14:23:00 【Chaoying.】
The script will ArcMap Each layer in is exported as a picture separately
import arcpy
import os
def exportbatch(outdir, export_width, export_height, resolution):
# outdir the directory to store the exported pngs
mxd = arcpy.mapping.MapDocument('CURRENT')
df = arcpy.mapping.ListDataFrames(mxd)[0]
layers = arcpy.mapping.ListLayers(mxd, data_frame=df)
for layer in layers:
for lay in layers:
lay.visible = False
layer.visible = True
filename = layer.name
if filename.endswith('tif'):
filename = filename[0:-4]
filename += '.tif'
outpath = os.path.join(outdir, filename)
arcpy.mapping.ExportToTIFF(map_document=mxd, out_tiff=outpath, data_frame=df, df_export_width=export_width,
df_export_height=export_height, resolution=resolution, tiff_compression='LZW')
arcpy.AddMessage('Export gas beed finised!')
outdir = arcpy.GetParameterAsText(0)
export_width = arcpy.GetParameter(1)
export_height = arcpy.GetParameter(2)
resolution = arcpy.GetParameter(3)
exportbatch(outdir, export_width, export_height, resolution)
Script addition method reference ArcGIS Batch render layer scripts
The script parameters are set as follows :
- Tool operation interface

边栏推荐
- Pycharm远程连接服务器来跑代码
- Knowledge about adsorption
- Codeforces Global Round 21A~D
- Never use redis expired monitoring to implement scheduled tasks!
- CF676C Vasya and String
- 方程推导:二阶有源带通滤波器设计!(下载:教程+原理图+视频+代码)
- Practice with the topic of bit operation force deduction
- Luogu p4513 xiaobaiguang Park
- MySQL | basic commands
- C | analysis of malloc implementation
猜你喜欢

ICML 2022 | LIMO: 一种快速生成靶向分子的新方法

Intellij IDEA--格式化SQL文件的方法

Correlation of XOR / and

FreeFileSync 文件夹比较与同步软件

C language | Consortium

PostGIS create spatial database

Correlation analysis related knowledge

9 articles, 6 interdits! Le Ministère de l'éducation et le Ministère de la gestion des urgences publient et publient conjointement neuf règlements sur la gestion de la sécurité incendie dans les établ

服务器创建虚拟环境跑代码

ArcGIS cannot be opened and displays' because afcore cannot be found ' DLL, solution to 'unable to execute code'
随机推荐
Gee - Global Human Settlements grid data 1975-1990-2000-2014
Formal parameters vs actual parameters
idea快捷键
Related knowledge of libsvm support vector machine
在线牛人博主
Sword finger offer 06.24.35 Linked list
通俗语言说BM3D
Build your own PE manually from winpe of ADK
C language | the difference between heap and stack
Leaflet loading ArcGIS for server map layers
D check type is pointer
windows版MySQL软件的安装与卸载
[jsoi2015] string tree
Online bull Blogger
ArcGIS cannot be opened and displays' because afcore cannot be found ' DLL, solution to 'unable to execute code'
MySQL configuration improves data insertion efficiency
Exercises under insect STL string
Common evaluation indexes of classification model -- confusion matrix and ROC curve
When drawing with origin, capital letter C will appear in the upper left corner of the chart. The removal method is as follows:
Intellij IDEA--格式化SQL文件的方法