TimeSpecialDays (arcpy.sa)
摘要
将夏至/春秋分/冬至日定义为时间段以进行太阳能量计算。
语法
TimeSpecialDays ()
代码实例
TimeSpecialDays 示例 1(Python 窗口)
演示如何创建 TimeSpecialDays 类并在 Python 窗口中的 AreaSolarRadiation 工具中使用 TimeSpecialDays 类。
import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "C:/sapyexamples/data"
outAreaSolar = AreaSolarRadiation("solar_dem", "", 200, TimeSpecialDays())
outAreaSolar.save("C:/sapyexamples/output/areasolartsd")
TimeSpecialDays 示例 2(独立脚本)
通过 AreaSolarRadiation 工具使用 TimeSpecialDays 类计算入射太阳辐射。
# Name: TimeSpecialDays_Ex_02.py
# Description: Execute AreaSolarRadiation using the TimeSpecialDays object
# Requirements: Spatial Analyst Extension
# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
# Set environment settings
env.workspace = "C:/sapyexamples/data"
# Set local variables
inRaster = "solar_dem"
# Create TimeSpecialDays Object
myTimeSpecialDay = TimeSpecialDays()
# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")
# Execute AreaSolarRadiation
outAreaSolar = AreaSolarRadiation(inRaster, "", 200, myTimeSpecialDay, 14,
0.5, "NOINTERVAL", 1, "FROM_DEM", 32, 8, 8,
"UNIFORM_SKY", 0.3, 0.5)
# Save the output
outAreaSolar.save("C:/sapyexamples/output/areasolartsd2")
相关主题
5/10/2014