SVF
- class eolab.georastertools.SVF(nb_directions: int, radius: int, resolution: float)[source]
Bases:
Rastertool,WindowableRaster tool that computes the Sky View Factor (SVF) of a Digital Elevation / Surface / Height Model.
Kokalj, Žiga & all 2013:
SVF is a geophysical parameter that measures the portion of the sky visible from a certain point. The portion of the sky visible above the surface is especially relevant in energy balance studies and computation of diffuse solar insolation.
Sky-view factor is defined as the proportion of visible sky (\(\Omega\)) above a certain observation point as seen from a two-dimensional representation.
The light that falls from the sky onto a certain part of the surface is reduced by the obstacles that form the horizon. These obstacles can be described in all directions by the vertical elevation angle above the horizontal plane.
A good SVF approximation can therefore be performed with the estimate of this angle in several directions. After the vertical elevation angle is determined in the chosen number of directions n, the SVF is determined as a sum of all portions of the sky within each direction: \(\sum \frac {\cos \gamma_i}{n}\), where \(\gamma_i\) is the vertical angle of the horizon in the`direction i.
The angle \(\gamma\) is extracted from the Digital Model: \(\tan \frac{Height}{Distance}\):
_____ x| | ^ x | | | Height (from Digital Model) x __ | | | ____p_______| |___| |__v____________ <--------------> Distance
Where p is the current pixel where the SVF is computed.
In a direction, the algorithm computes all angles and keeps the largest one. To avoid testing too many points, the “radius” parameter defines the max distance of the pixel to test.
The output image of SVF rastertool is a raster image with the SVF value computed at every pixels of the input Digital Elevation Model.
Attributes
The altitude at which SVF is computed.
Whether intermediate VRT images shall be kept
Number of directions to compute the SVF
Path of the output directory where are stored the results
//numpy.org/doc/stable/reference/generated/numpy.pad.html>`_ the image when the window is on the edge of the image The mode can be self defined or among [constant (default), edge, linear_ramp, maximum, mean, median, minimum, reflect, symmetric, wrap, empty].
Max distance from current point (in pixels) to consider for evaluating the max elevation angle
Resolution of the input Digital Elevation Model (in meter)
Dir where to store intermediate VRT images
Size of the windows to split the image in small parts
Methods
SVF.__init__(nb_directions, radius, resolution)Constructor
SVF.postprocess_files(inputfiles, outputfiles)Run a postprocess when all input files have been processed.
SVF.process_file(inputfile)Compute SVF for the input file
SVF.process_files(inputfiles)Run the rastertool to a set of input files.
SVF.with_altitude(altitude)Configure the altitude at which the Sky View Factor shall be computed.
SVF.with_output([outputdir])Set up the output.
SVF.with_vrt_stored(keep_vrt)Configure if the intermediate VRT images that are generated when handling the input files (which can be complex raster product composed of several band files) shall be stored to disk or not - for debug purpose for instance.
SVF.with_windows([window_size, pad_mode])Configure the window generation for processing image