当前位置:网站首页>栅格矢量数据的裁剪
栅格矢量数据的裁剪
2022-06-28 13:26:00 【kelly1250230225】
栅格裁剪(ExtractByMask):同一栅格文件,不同矢量文件
#栅格裁剪(ExtractByMask):同一栅格文件,不同矢量文件
#Author: Changqing Guo
# coding: utf-8
import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension("Spatial")
arcpy.env.workspace = "D:/Test/shp"
arcpy.env.overwriterOutput = True
outfiles = "D:/Test/out"
infiles = "D:/Test/Tif/00_dem.tif"
clipfiles = arcpy.ListFiles("*.shp")
for filename in clipfiles:
print("Processing:" + filename)
clipputfiles = arcpy.env.workspace + "/" + filename
outputfiles = outfiles + "/" + filename[:-4]
outExtractByMask = ExtractByMask(infiles, clipputfiles)
outExtractByMask.save(outputfiles + ".tif")
print "***OVER***"
print arcpy.GetMessages()
栅格裁剪(ExtractByMask):同一矢量文件,不同栅格文件
#栅格裁剪(ExtractByMask):同一矢量文件,不同栅格文件
#Author: Changqing Guo
# coding: utf-8
import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension("Spatial")
arcpy.env.workspace = "Z:/0/01/01"
arcpy.env.overwriterOutput = True
outfiles = "Z:/0/01/05caijian/02et"
clipfiles = "Z://New_Shapefile.shp"
infiles = arcpy.ListFiles("*.tif")
for filename in infiles:
print("Processing:" + filename)
inputfiles = arcpy.env.workspace + "/" + filename
outputfiles = outfiles + "/" + filename
outExtractByMask = ExtractByMask(inputfiles, clipfiles)
outExtractByMask.save(outputfiles + ".tif")
print "***OVER***"
print arcpy.GetMessages()
边栏推荐
- 做一个墨水屏电子钟,炫酷!
- PHP obtains the beginning and end time of the month according to the month and year
- 其他国产手机未能填补华为的空缺,苹果在高端手机市场已无对手
- Class structure in C language - dot
- G1 important configuration parameters and their default values in the garbage collector
- MySQL multi table joint query
- 决策树预测红酒品质
- Pytorch model
- yii2编写swoole的websocket服务
- In the past four years, the number of users exceeded 100 million, and sun Ge led the wave field to a new high
猜你喜欢

Tencent tangdaosheng: facing the new world of digital and real integration, developers are the most important "architects"

其他国产手机未能填补华为的空缺,苹果在高端手机市场已无对手

New product experience: Alibaba cloud's new generation of local SSD instance I4 open beta

Writing skills of resume

程序员坐牢了,会被安排去写代码吗?

The company leader said that if the personal code exceeds 10 bugs, he will be dismissed. What is the experience?

公司领导说,个人代码超10个Bug就开除,是什么体验?

To be the Italian Islander? Liuqiangdong cashed out 6.6 billion yuan in two months and made a one-time 560million "emergency transfer" to buy the European maritime Palace

中国广电5G套餐来了,比三大运营商低,却没预期那么低

How to find opportunities in a bear market?
随机推荐
哈希竞猜游戏系统开发技术成熟案例及源码
Mobile web training day-2
Forecast and Analysis on market scale and development trend of China's operation and maintenance security products in 2022
公司领导说,个人代码超10个Bug就开除,是什么体验?
How about stock online account opening and account opening process? Is it safe to open a mobile account?
Vscode shortcut key
How to solve the data inconsistency between redis and MySQL?
中国数据库技术大会(DTCC)特邀科蓝SUNDB数据库专家精彩分享
1015. picking flowers
Electronic components distribution 1billion Club [easy to understand]
The counter attack story of Fu Jie, a young secondary school student: I spent 20 years from the second undergraduate to the ICLR outstanding Thesis Award
China Database Technology Conference (DTCC) specially invited experts from Kelan sundb database to share
程序员坐牢了,会被安排去写代码吗?
初识exception
[understanding of opportunity -32]: Guiguzi - Dui [x ī] Five attitudes towards danger and problems
2022年中国运维安全产品市场规模及发展趋势预测分析
Centos7——安装mysql5.7
RK3399平台开发系列讲解(使用篇)Pinctrl子系统的介绍 - 视频介绍
Complete backpack beginner chapter "suggestions collection"
G1垃圾收集器中重要的配置参数及其默认值