简单来说,对于矢量数据采用投影arcpy.management.Project,对于栅格数据采用投影栅格arcpy.management.ProjectRaster,如果没有数据空间参考采用定义投影arcpy.management.DefineProjection。他们都可以传入空间参考类的实例化对象作为参数传入,拿定义投影举例: import arcpy infc = r"C:\data\demo.shp" sr = arcpy.SpatialRefe...
# Project:为了计算面积:单位:METER arcpy.Project_management('C:\Users\Songhua Hu\Documents\ArcGIS\Default.gdb\inter_chicago_bike_landuse', 'C:\Users\Songhua Hu\Documents\ArcGIS\Default.gdb\inter_chicago_bike_landuse1', arcpy.SpatialReference('WGS 1984 UTM Zone 16N')) 投影后会自动计算出shape ...
Project_management 工具SpatialReference 对象Describe 对象ApplySymbologyFromLayer_management 工具 黑色窗体参考代码: View Code 1. 同一图层的多个要素合并 方法一:可以通过 Editor 对要素进行编辑,然后选中后通过使用 Merge 工具可以实现。利用 ArcPy 实现自动化处理,需要用到 Dissolve 工具,可以按照相同字段值进行合并...
arcpy.BatchProject_management(in_features, output_folder, outCS) arcpy.env.workspace = output_folder transType=0 if(outCSStr=='wgs84'): arcpy.AddMessage("transform succeed") elif(outCSStr=='gaode'): arcpy.AddMessage("target coords gaode") transType='3' elif(outCSStr=='baidu'): transTyp...
path.join(rootPath[0],fName) out_raster=fName+"_prj.shp" arcpy.Project_management(in_features, out_raster, outCS) Example #10Source File: Generate_Regional_Transactional_Region_11_FGDB.py From geo-pit with GNU General Public License v2.0 5 votes def compareDatum(fc): # Return True ...
简单来说,对于矢量数据采用投影arcpy.management.Project,对于栅格数据采用投影栅格arcpy.management.ProjectRaster,如果没有数据空间参考采用定义投影arcpy.management.DefineProjection。他们都可以传入空间参考类的实例化对象作为参数传入,拿定义投影举例: 代码语言:javascript ...
import arcpyfrom arcpy import env# 设置工作空间以便创建中间文件env.workspace = 'C:/Users/haffnerm/Downloads/'# 从磁盘读取数据并转换arcpy.management.Project('Crashes_Involving_Cyclists.shp','crashes_proj.shp',arcpy.SpatialReference(32119))# 选择司机数量大于 1 的事故arcpy.Select_analysis('crashes_pr...
out_raster=fName+"_prj.shp"arcpy.Project_management(in_features, out_raster, outCS) 開發者ID:richieBao,項目名稱:python-urbanPlanning,代碼行數:12,代碼來源:pointsToRasterBundle.py 示例10: compareDatum ▲點讚 5▼ # 需要導入模塊: import arcpy [as 別名]# 或者: from arcpy importSpatialReference...
myProject.gdb,myFeatureClass) 6.2数据投影数据投影 使用使用arcpy.Project_management 此工具可以将数据从一个投影系统转换到另一个投影系统。例如,将一个要素类从WGS1984投 影到NAD1983UTMZone15N: importarcpy #设置工作空间 arcpy.env.workspace=rC:\data\myProject.gdb #定义输出坐标系统 outCS=arcpy.SpatialRefe...
['central_meridian',105.0],PARAMETER['standard_parallel_1',25.0],PARAMETER['standard_parallel_2',47.0],PARAMETER['latitude_of_origin',0.0],UNIT['Meter',1.0]]"cellsize= 500arcpy.ProjectRaster_management(file, outPath+file, Coordinate_System,"BILINEAR", cellsize,"","","")print(file+"OK")...