I want to use ArcGIS Point Solar Radiation tool to compute the solar radiation for more than 1000 data points. The table for the shapefile point data looks like this:
Hour represent the time of start and ending time of collection. The julian column is the julian day.
I believe ArcGIS provides the code below to work for one row only:
# 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 = "elevation" inPntFC = "observers.shp" outFeatures = "c:/sapyexamples/output/outglobal1.shp" latitude = 35.75 skySize = 200 timeConfig = TimeWithinDay(183, 16, 16) dayInterval = 14 hourInterval = 0.5 zFactor = 0.3048 calcDirections = 32 zenithDivisions = 8 azimuthDivisions = 8 diffuseProp = 0.3 transmittivity = 0.5 outDirectRad = "C:/sapyexamples/output/outdirectrad1.shp" outDiffuseRad = "C:/sapyexamples/output/outdiffuserad1.shp" outDirectDur = "C:/sapyexamples/output/outduration1.shp" # Execute PointsSolarRadiation... PointsSolarRadiation(inRaster, inPntFC, outFeatures, "", latitude, skySize, timeConfig, dayInterval, hourInterval, "INTERVAL", zFactor, "FROM_DEM", calcDirections, zenithDivisions, azimuthDivisions,"STANDARD_OVERCAST_SKY", diffuseProp, transmittivity, outDirectRad, outDiffuseRad, outDirectDur)
How could I edit the code so that it would calculate the solar radiation per row (or per point sample)?
I want to keep most of the values constant, except for:
timeConfig = TimeWithinDay(183, 16, 16)
That means that in every run, it will only change the 'Julian' day and the 'hour' and keep the rest of the values the same. For example: (183, 16, 16) should be (269, 18, 18) when the code runs to calculate the third row.
In the end, once all the rows are calculated, a new column would be added for the solar radiation of each row.
I am new to coding.