当前位置:   article > 正文

python批处理栅格转点_python批处理系列代码-栅格转点

arcpy.rastertopoint_conversion

import arcpy

from arcpy import env

from arcpy.sa import *

import os

import os.path

import sys,string

#arcpy.env.workspace = “D:\\TIF\\IMERGD\\Y”

dir = “D:\\TIF\\IMERGD\\Y”

filenames = os.listdir(dir)

for filename in filenames:

if os.path.splitext(filename)[1] == ‘.tif’:

inRaster = dir + os.sep + filename

Output_Workspace = “D:\\test”

basename = os.path.splitext(filename)[0] + ‘_bdmm’;

outPoint = Output_Workspace + os.sep + basename + ‘.shp’;

field = “VALUE”

arcpy.RasterToPoint_conversion(inRaster,outPoint,field)

print “ok”

转载自:https://blog.csdn.net/liudan19940618/article/details/82781716

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/310885
推荐阅读
相关标签
  

闽ICP备14008679号