ArcGIS 10 影像、栅格数据格式批量转换
2016-12-05 13:02
176 查看
在做三维场景的时候,经常会涉及多种不同格式DEM数据或者影像的转换,如ASCII、GRID、IMG、TIFF等等,遇到大数据量时,我们就需要批量转换功能了。
下面使用python脚本来实现批量转换,把f:\\test文件夹下的*.grd栅格文件转换为*.TIFF文件并存于其下的TIFF子文件夹中:
[python] view
plain copy
# Import system modules
import sys, string, os
dir = 'F:\\test'
# Import arcpy module
import arcpy
files = os.listdir(dir)
for f in files:
if os.path.splitext(f)[1] == '.grd':
# Script arguments...
Input_raster_file = dir + os.sep + f
# Local variables...
Output_data_type = "FLOAT"
Raster_Format = "TIFF"
Output_Workspace = "f:\\test\\TIFF"
# =============== file name process ======================
basename = os.path.splitext(f)[0];
Output_raster = Output_Workspace + os.sep + basename + ".tif";
if os.path.exists(Output_raster) == False:
print Input_raster_file
# Process: Raster To Other Format (multiple)...
arcpy.RasterToOtherFormat_conversion(Input_raster_file,
Output_Workspace, Raster_Format)
print Output_raster
注:当然此方法也适用于各类影像数据格式的转换。
下面使用python脚本来实现批量转换,把f:\\test文件夹下的*.grd栅格文件转换为*.TIFF文件并存于其下的TIFF子文件夹中:
[python] view
plain copy
# Import system modules
import sys, string, os
dir = 'F:\\test'
# Import arcpy module
import arcpy
files = os.listdir(dir)
for f in files:
if os.path.splitext(f)[1] == '.grd':
# Script arguments...
Input_raster_file = dir + os.sep + f
# Local variables...
Output_data_type = "FLOAT"
Raster_Format = "TIFF"
Output_Workspace = "f:\\test\\TIFF"
# =============== file name process ======================
basename = os.path.splitext(f)[0];
Output_raster = Output_Workspace + os.sep + basename + ".tif";
if os.path.exists(Output_raster) == False:
print Input_raster_file
# Process: Raster To Other Format (multiple)...
arcpy.RasterToOtherFormat_conversion(Input_raster_file,
Output_Workspace, Raster_Format)
print Output_raster
注:当然此方法也适用于各类影像数据格式的转换。
相关文章推荐
- ArcGIS 10 影像、栅格数据格式批量转换
- ArcGIS 10 影像、栅格数据格式批量转换
- ArcGIS 10 影像去黑边
- ArcGIS 10 影像分析工具及ArcGIS Engine的实现
- ArcGIS 10 影像分析工具及ArcGIS Engine的实现
- ArcGIS 10研究(三) 之影像技术新特性
- ArcGIS 10 新特性之栅格和影像数据
- ArcGIS 10研究(三) 之影像技术新特性
- 【技术类】【ArcGIS对国产卫星的支持2:高分一号卫星】篇10、缓存影像服务发布
- ArcGIS 10研究(三) 之影像技术新特性
- ARCGIS DESKTOP 10 iso下载地址
- 预览ArcGIS 10中有关编辑的变化
- Arcgis desktop 10及Arcgis Engine 10破解
- Arcgis栅格时序地图制作---时间轴动态展示多期影像
- 利用ArcGIS去除Landsat 7 ETM+影像条带
- [ ArcGIS 10 API for Javascript 系列 ] - 常见问题
- ArcGIS Engine Runtime 10 中文补丁 可用于官方 ArcGIS Engine SP中文补丁的升级
- 写在ArcGIS Desktop 10新特性前面的话
- ArcGIS 10中WFS缓存问题的解决方法与原理
- ArcGIS影像数据库的建立与入库