arcpy-栅格转其他格式


import arcpy
in_format=arcpy.GetParameterAsText(0)
out_format=arcpy.GetParameterAsText(1)
out_folder=arcpy.GetParameterAsText(3)
arcpy.env.workspace=arcpy.GetParameterAsText(2)
rasters=arcpy.ListRasters("*",)
arcpy.RasterToOtherFormat_conversion(rasters,out_folder,out_format)

注意栅格名称中不要出现中文字符。

RasterToOtherFormat_conversion帮助页:http://desktop.arcgis.com/zh-cn/arcmap/10.3/tools/conversion-toolbox/raster-to-other-format.htm

 

插个广告,制作ArcGIS的Tool工具学习下面的教程就对了:
零基础学习Python制作ArcGIS自定义工具观看链接
《零基础学习Python制作ArcGIS自定义工具》课程简介


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM