1. 程式人生 > >arcgis python get raster extent and set envs.extent (環境設定中的範圍)

arcgis python get raster extent and set envs.extent (環境設定中的範圍)

在Arcgis python函式操作前想要設定範圍可以通過arcpy.envs.extent實現,對於柵格來說,獲取範圍的方法是定義柵格變數,獲取其範圍。

import arcpy

elevRaster = arcpy.sa.Raster('C:/data/elevation')
myExtent = elevRaster.extent

print myExtent

arcpy.envs.extent = myExtent

# some other action

refs:

相關推薦

arcgis python get raster extent and set envs.extent (環境設定範圍)

在Arcgis python函式操作前想要設定範圍可以通過arcpy.envs.extent實現,對於柵格來說,獲取範圍的方法是定義柵格變數,獲取其範圍。 import arcpy elevRast

Python--Get and Post

err import imp pan style encode eth ret port #python3 get and post 簡單封裝from urllib import request, parseimport jsondef RequestMethod(meth

Get and Set Column/Row Names for Data Frames

for you code tis ons sign base eve pan row.names(x)row.names(x) <- value rownames(x, do.NULL = TRUE, prefix = "row") rownames(x)

python物件資料型別Iterator與Sequece , Mapping and Set的區別

前言: 迭代器都是能夠可迭代和具有__iter__屬性的 但是能夠可迭代和具有__iter__屬性的不一定就是迭代器(iterator),它比迭代器要高一個等級。 iterator(迭代器) 必須有兩種方法: next:Return the next item from

Set VM RDM disk to Round Bobin and set IOPS path to 1

iops rdm KB Related to IOPS settingAdjusting Round Robin IOPS limit from default 1000 to 1 (2069356)https://kb.vmware.com/selfservice/microsites/search

[Python] How to unpack and pack collection in Python?

ide ont add off art video lec ref show It is a pity that i can not add the video here. As a result, i offer the link as below: How to

Python基礎day-4[dict,set,bool]

pro 錯誤 name 特性 字典 無法 密碼 精確 新增 布爾類型:   True和False   所有的數據類型自帶布爾值,只有0,None,空的布爾值為False 字典dict:   特性:dict中使用key和對應的value來存儲數據,dict不像 list那樣,

SEED實驗——Environment Variable and Set-UID Program實驗描述與實驗任務

文件 cond get ibm after linu promise 這一 variable 第一部分:實驗描述 該實驗的學習任務是理解環境變量是如何影響程序和系統行為的。環境變量是一組動態命名的變量 第二部分:實驗任務 2.1 任務一:操作環境變量 在這個任務中,我們研

arcgis python 沿線生成點

dsp bound occurs ren creat style bool cep calc # coding: utf-8 """ Source Name: generatepointsfromlines.py Version: ArcGIS 1

python模塊—command and sys

python1.commands模塊linux系統環境下用於支持shell的一個模塊1)getoutput() 返回值只有返回結果(字符串類型),沒辦法判斷執行結果是否正常例子import commandscmd = "ls /data/temp"result1 = commands.getoutput(c

python模塊—StringIO and BytesIO

python1.StringIO模塊在平時開發過程中,有些時候我們可能不需要寫在文件中,我們可以直接通過StringIO模塊直接寫入到系統內存中,如果不用了,可以直接清除就可以了。StringIO主要是用來在內存中寫入字符串的,及字符串的緩存。1.1通過StringIO寫入內存例子#from io impor

Python學習之dict和set

不可變 需要 after 集合 value 報錯 list 也會 如果 #coding=utf-8 # dict dict= {‘bob‘: 40, ‘andy‘: 30} print dict[‘bob‘] # 通過dict提供的get方法,如果key不存在,可以返回N

python基礎(6)---set、collections介紹

iss ini format eof init dir turn alt __init__ 1.set(集合)   set和dict類似,也是一組key的集合,但不存儲value。由於key不能重復,所以,在set中,沒有重復的key。   集合和我們數學中集合的概念是一樣

python基礎之dict和set

算法 dict name 區別 刪除元素 哈希算法 div 數學 blog dict dict是dictionary的縮寫,python內置了字典,在其他語言中也稱為map,使用鍵值對儲存,具有極快的查找速度。 如果是只用list來實現,就需要兩個list,先在第一個lis

python之路——集合and 深淺copy

amp 女神 div 差集 del add body 並集 不可變類 補充: id 查詢內存地址 print(id(name)) is判斷的是內存地址 int str 小數據池 int: -5 — 256 str: 如果字符串都是由字母組成,都是指向一個內存地址。   

做密碼學會用到的python函數--kali and windows

default 二進制 str inux span 有效 and 定義 -- 先創建一個python文件:touch python 查看python版本型號:Python -V 例如:root@saya:~# python -V Py

python unicode to str and str to unicode

spa cap cme lse PE static not style code @staticmethod def unicode2str(p_unicode): v = p_unicode.encode(‘unicode-escape‘

python數據類型--set(集合)

tle mage 同學 href 拆分 都是 code 不可變對象 作者     博客地址:http://www.cnblogs.com/yudanqu/   首先,簡單介紹一下set,set就是我們中學時所學的集合,當時集合的性質就包括一點,集合裏不能有重復的數字。我

9 Python基礎-使用dict和set

CI ng- 重復元素 無序 比較 變化 all 存放位置 lan dict Python內置了字典:dict的支持,dict全稱dictionary,在其他語言中也稱為map,使用鍵-值(key-value)存儲,具有極快的查找速度。 舉個例子,假設要根據同學的名字查找對

Python容器--list, tuple, dict, set

差集 express 賦值 大括號 占用 字典 由於 xtend insert ## Python 中有四種用於存放數據的序列--list, tuple, dict, set ## list 列表   - 可以存放任意類型數據的有序序列   - 列表可以由零個或多個元