需要 Spatial Analyst 许可。
描述
将夏至/春秋分/冬至日定义为时间段以进行太阳能量计算。
语法
TimeSpecialDays ()
代码示例
演示如何创建 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")
通过 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()
# 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")