ArcGIS Python 批量定义投影
对一组文件批量定义投影
1、坐标系参数源自已知文件:
2、坐标系参数源自定义:
import arcpy
# set environment
arcpy.env.workspace=r”E:\DATA\135″
rasters = arcpy.ListRasters(“*”, “img”) # get files
# define coordinate system
Coordinate_System = “PROJCS[‘WGS_1984_UTM_Zone_53N’,GEOGCS[‘GCS_WGS_1984’,DATUM[‘D_WGS_1984’,SPHEROID[‘WGS_1
984′,6378137.0,298.257223563]],PRIMEM[‘Greenwich’,0.0],UNIT[‘Degree’,0.0174532925199433]],PROJECTION[
‘Transverse_Mercator’],PARAMETER[‘False_Easting’,500000.0],PARAMETER[‘False_Northing’,0.0],PARAMETER
[‘Central_Meridian’,135.0],PARAMETER[‘Scale_Factor’,0.9996],PARAMETER[‘Latitude_Of_Origin’,0.0],UNIT[
‘Meter’,1.0]]”
for ras in rasters:
print str(ras)
arcpy.DefineProjection_management(ras, Coordinate_System)
print(“OK”)
转载自:https://blog.csdn.net/u010603297/article/details/46537191