柵格轉shp

import arcpy
from arcpy import env
 
env.workspace = "E:/data/temp/data"
field = "VALUE"
inRaster = "single_"
outPolygons = "E:/data/temp/data/shpsingle_"
num = 3
while(num <= 300):
    inRaster += str(num)
    inRaster += ".tif"
    outPolygons += str(num)
    outPolygons += ".shp"
    arcpy.RasterToPolygon_conversion(inRaster, outPolygons, "NO_SIMPLIFY", field)
    inRaster = "single_"
    outPolygons = "E:/data/temp/data/shpsingle_"
    num += 3
print "finish"
發佈了188 篇原創文章 · 獲贊 65 · 訪問量 25萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章