Shadow coverage
Shadow coverage
- pybdshadow.cal_sunshine(buildings, day='2022-01-01', roof=False, grids=Empty GeoDataFrame Columns: [] Index: [], accuracy=1, precision=3600, padding=1800)
Calculate the sunshine time in given date.
- Parameters:
buildings (GeoDataFrame) – Buildings. coordinate system should be WGS84
day (str) – the day to calculate the sunshine
roof (bool) – whether to calculate roof shadow.
grids (GeoDataFrame) – grids generated by TransBigData in study area
precision (number) – time precision(s)
padding (number) – padding time before and after sunrise and sunset
accuracy (number) – size of grids. Produce vector polygons if set as vector
- Returns:
grids – grids generated by TransBigData in study area, each grids have a time column store the sunshine time
- Return type:
GeoDataFrame
- pybdshadow.cal_sunshadows(buildings, cityname='somecity', dates=['2022-01-01'], precision=3600, padding=1800, roof=True, include_building=True, save_shadows=False, printlog=False)
Calculate the sunlight shadow in different date with given time precision.
- Parameters:
buildings (GeoDataFrame) – Buildings. coordinate system should be WGS84
cityname (string) – Cityname. If save_shadows, this function will create result/cityname folder to save the shadows
dates (list) – List of dates
precision (number) – Time precision(s)
padding (number) – Padding time (second) before and after sunrise and sunset. Should be over 1800s to avoid sun altitude under 0
roof (bool) – whether to calculate roof shadow.
include_building (bool) – whether the shadow include building outline
save_shadows (bool) – whether to save calculated shadows
printlog (bool) – whether to print log
- Returns:
allshadow – All building shadows calculated
- Return type:
GeoDataFrame
- pybdshadow.cal_shadowcoverage(shadows_input, buildings, grids=Empty GeoDataFrame Columns: [] Index: [], roof=True, precision=3600, accuracy=1)
Calculate the sunlight shadow coverage time for given area.
- Parameters:
shadows_input (GeoDataFrame) – All building shadows calculated
buildings (GeoDataFrame) – Buildings. coordinate system should be WGS84
grids (GeoDataFrame) – grids generated by TransBigData in study area
roof (bool) – If true roof shadow, false then ground shadow
precision (number) – time precision(s), which is for calculation of coverage time
accuracy (number) – size of grids.
- Returns:
grids – grids generated by TransBigData in study area, each grids have a time column store the shadow coverage time
- Return type:
GeoDataFrame