Sky View Factors from Synthetic Fisheye Photos for Thermal Comfort Routing—A Case Study in Phoenix, Arizona

The Sky View Factor (SVF) is a dimension-reduced representation of urban form and one of themajor variables in radiation models that estimate outdoor thermal comfort. Commonways of retrieving SVFs in urban environments include capturing fisheye photographs or creating a digital 3D city or elevation model of the environment. Such techniques have previously been limited due to a lack of imagery or lack of full scale detailed models of urban areas. We developed a web based tool that automatically generates synthetic hemispherical fisheye views from Google Earth at arbitrary spatial resolution and calculates the corresponding SVFs through equiangular projection. SVF results were validated using Google Maps Street View and compared to results from other SVF calculation tools. We generated 5-meter resolution SVF maps for two neighborhoods in Phoenix, Arizona to illustrate fine-scale variations of intra-urban horizon limitations due to urban form and vegetation. To demonstrate the utility of our synthetic fisheye approach for heat stress applications, we automated a radiation model to generate outdoor thermal comfort maps for Arizona State University’s Tempe campus for a hot summer day using synthetic fisheye photos and on-site meteorological data. Model output was tested against mobile transect measurements of the six-directional radiant flux density. Based on the thermal comfort maps, we implemented a pedestrian routing algorithm that is optimized for distance and thermal comfort preferences. Our synthetic fisheye approach can help planners assess urban design and tree planting strategies to maximize thermal comfort outcomes and can support heat hazard mitigation in urban areas.


Introduction
Heat is the leading cause of weather-related mortality in the U.S and poses a significant threat to pub-lic health (National Oceanic and Atmospheric Administration [NOAA], 2015). Exposure to extreme heat is expected to increase in the future, as rapid urbanization continues and heat waves are projected to become more intense, more frequent, and longer lasting (Jones et al., 2015). Past research has shown that daytime heat can be reduced through microclimate-responsive urban design that acknowledges the cooling potential of urban form and vegetation (Erell, Pearlmutter, & Williamson, 2012;Lenzholzer & Brown, 2016). Dense urban forms can create local cool islands during the day and are particularly effective at mitigating heat in hot desert environments where water is scarce (Middel, Häb, Brazel, Martin, & Guhathakurta, 2014;Pearlmutter, Bitan, & Berliner, 1999).
Heat is most commonly expressed as air temperature, but temperature alone is not a comprehensive indicator of outdoor thermal comfort or stress. Thermal comfort is influenced by numerous environmental factors, including temperature, radiation, humidity, and wind speed; and personal factors, such as clothing and activity level (Ng & Cheng, 2012;Nikolopoulou & Lykoudis, 2006;Vanos, Warland, Gillespie, & Kenny, 2010). In outdoor spaces, radiation is one of the most important variables affecting thermal comfort; perceived thermal comfort can vary several degrees in the shade and sun (Mayer & Höppe, 1987;Middel, Selover, Hagen, & Chhetri, 2016). Thermal conditions in urban areas vary widely due to complex shading patterns from buildings and trees that determine solar access at the pedestrian level. Therefore, air temperature maps fail to accurately represent the significant variation of thermal conditions in built environments.
In urban climate research, the Sky View Factor (SVF) has been widely used as approximation of the 3D urban geometry to assess the urban heat island (UHI) and longwave radiative heat loss in cities at night (Brandsma & Wolters, 2012;Gál, Lindberg, & Unger, 2009;Oke, 1981;Unger, 2004). SVF is defined as the fraction of visible sky on a hemisphere and ranges from zero to one, denoting the ratio of the radiation received (emitted) by a planar surface to the radiation emitted (received) by the entire hemisphere (Johnson & Watson, 1984). SVF is relevant to human thermal comfort, as it affects Mean Radiant Temperature (MRT), a synthetic parameter that summarizes the direct and reflected short and longwave radiation fluxes a human body is exposed to. MRT is one of the most important meteorological variables in the assessment of thermal comfort and the basis for many human thermal comfort indices (Johansson, Thorsson, Emmanuel, & Krüger, 2014;Lee, Holst, & Mayer, 2013;Thorsson, Lindberg, Eliasson, & Holmer, 2007).
Numerous models have been developed to calculate SVF and MRT in urban settings at different spatial scales and with varying data requirements. Mayer (2007, 2010) developed RayMan to model SVF and MRT from hemispherical photos and meteorological observations. The model has been shown to perform reasonably well in homogeneous urban environments (Lee & Mayer, 2016), yet it is limited to a single point in space. The SkyHelios model (Matzarakis & Matuschek, 2011) simulates continuous SVFs for small ur-ban areas, but requires a geometric obstacle file. More recently, studies have presented continuous SVF calculations using 3D city models (Chen et al., 2012;Gál et al., 2009;Unger, 2009;White, Hu, Langenheim, Ding, & Burry, 2016), but these calculations usually do not incorporate vegetation. Tree canopy cover significantly reduces SVF at the pedestrian level and is an important shade source that should be incorporated in view factor analyses and outdoor thermal comfort assessments. The SOLWEIG model has been successfully applied to calculate SVF and MRT for urban areas using digital surface models (DSMs) as representation of the urban morphology (Chen, Yu, Yang, & Mayer, 2016;Lindberg & Grimmond, 2011;Lindberg, Holmer, & Thornsson, 2008). Although trees have recently been added into SOLWEIG, the use of DSMs does not allow to model complex urban forms, such as building overhangs and shade structures.
We developed a methodology to calculate SVFs for large urban areas at high spatial resolution using synthetically generated fisheye images from Google Earth. Our approach calculates SVFs for large urban areas incorporating the full 3D environment, including vegetation, and is independent of available 3D building databases or DSMs. As an example, we produced 5 m resolution SVF maps for two neighborhoods in the Phoenix metropolitan area overlaid over Google Earth terrain. To show the utility of our approach for thermal comfort and walkability assessments, we generated thermal comfort maps of Arizona State University's Tempe campus for a hot summer day in August 2016 using Google Earth hemispherical images and meteorological data from an on-site field campaign. We then utilized a routing algorithm for pedestrian navigation that is optimized for distance and individual outdoor thermal comfort preferences.

Methods
To assess intra-urban SVF variations in select neighborhoods in the Phoenix metropolitan area, we retrieved data from Google Earth on a 5 m resolution grid to generate synthetic 180°hemispherical views of the sky from 3D buildings, trees, and terrain. We removed the sky portion of the fisheye photos and calculated the SVF for each location on the grid through equiangular projection. Subsequently, we calculated MRT and a thermal comfort index using the synthetic fisheyes as input for an automated radiation model to inform our case study.

Retrieving Data from Google Earth
Google Earth version 7 allows users to render a 3D mesh of the ground that includes buildings, trees, shrubs, and other obstacles. The 3D mesh is generated from oblique imagery collected during Google overflight campaigns at a 45°angle in each cardinal direction and down. The aerial imagery is automatically converted into a 3D city model using stereo-photogrammetry and serves as texture for the 3D mesh so that the scene can be rendered.
As the current Google Earth Application Programming Interface (API) does not provide a function to export rendered images, we used a NodeJS server to remotely control a browser that runs the Google Earth plugin and takes screenshots of the browser window through the operating system API. First, our algorithm requests map tiles from the Google Maps service for an area of interest defined by an array of map tile coordinates and a sampling resolution, in our case 5 m, to determine sampling locations. Buildings and water bodies are excluded from the sampling. The algorithm generates a Keyhole Markup Language (KML) file with the coordinates of the locations to steer the virtual camera in Google Earth. Then, the camera takes a tour along the predefined route, and the operating system API takes a screenshot after the Google Earth plugin finishes loading the 3D mesh at each camera location. The camera view angle is set to 90°and the height is set to 1.1 m above ground level. 1.1 m is the recommended height for human thermal comfort applications, as it represents the center of gravity of the human body for standing subjects (ISO 7726, 1998). The algorithm takes five screenshots at each location-one in each cardinal direction and one upwards ( Figure 1a).

Fisheye Projection
After data retrieval, we generate synthetic fisheye images using an angular fisheye projection of the surroundings on a 2D plane (Figure 1b). For the projection, we treat the images as a cube map and perform ray casting in WebGL. Specifically, we represent the fisheye image as a unit square with center c = (0, 0) and calculate for each point p = (u, v) with length r = ‖p‖ ≤ 0.5 the corresponding position on the unit hemisphere. Points with r > 0.5 are not part of the fisheye and are therefore colored white. For all other points, the position on the hemisphere is given by with latitude θ = r π and normalized direction vector Subsequently, the vector v is used to sample the cube map, yielding the final fisheye image. The hemispherical view is then converted to black and white (white = sky; black = obstacles) using a deterministic sky color gradient ( Figure 1c).

Sky View Factor Calculation
Several methods are available to calculate the SVF based on fisheye images: The SVF can be calculated using analytical methods that derive the horizon limitation from geometric properties of the urban canyon (Johnson & Watson, 1984); vector-based methods that calculate the SVF from projected building envelopes on the sky using a 3D building database (Chen et al., 2012;Gál et al. 2009;Gál & Unger, 2014;Unger, 2009); raster-based methods that use digital elevation models (DEMs) or DSMs to estimate SVFs based on pixel heights or shadow casting (Gál et al., 2009;Lindberg & Grimmond, 2011;Lindberg et al., 2008;Ratti, Baker, & Steemers, 2005;Zakšek, Oštir, & Kokalj, 2011), and photographic methods that use fisheye imagery of the upper hemisphere Chapman & Thornes, 2004;Grimmond, Potter, Zutter, & Souch, 2001;Holmer, Postgård, & Eriksson, 2001). The hemispheric horizon limitation is usually projected on a 2D plane to calculate the amount of visible sky in the scene. The most widely used projection technique is the equiangular projection by Steyn (1980), where the projected image is divided into concentric annuli of equal width and then evaluated. We use a modified version of the manual Steyn-method for digitized fisheye photographs that was proposed by Chapman, . We partition the synthetic fisheye picture into n annular rings (default n = 36) and calculate the SVF by summing up the contribution of each ring: where p i /t i is the ratio between the number of sky pixels to the total number of pixels in ring i ( Figure 1d).

Thermal Comfort Modeling
Physiologically Equivalent Temperature (PET) is a widelyused thermal comfort index that is based on MRT, reported in°C, and expresses how people experience weather conditions, incorporating the radiative environment and personal characteristics, such as age, clothing, and metabolic rate (Höppe, 1999;Mayer & Höppe, 1987). The 1D RayMan model (Matzarakis et al., 2007 nieure, 1994). We automated the Windows GUI using a script that simulates keystrokes to remotely execute the RayMan tool and batch process thousands of georeferenced synthetic fisheyes for a given day and time. The results are collected in a CSV file and can subsequently be imported in ArcGIS using the fisheyes' latitude-longitude coordinates to generate high resolution MRT and PET maps for further analysis.

Sky View Factor Results
We evaluated the accuracy of our SVF approach in two steps. First, we compared the synthetic hemispherical images created from Google Earth to fisheye photos generated from Google Street View panoramic images using the SVF as accuracy metric. Second, we compared our SVF results to outputs from other algorithms using the same set of fisheye photos. After validation, we generated 5 m resolution SVF maps for two contrasting neighborhoods in Phoenix.

Evaluation of Sky View Factors
To assess the accuracy of the Google Earth fisheye images compared to real world photos, we generated 18,367 fisheye images from Google Street View panoramas across the Phoenix metropolitan area (Figure 2) using the Google Street View API. The fisheye generation process is similar to Google Earth, but requires a more sophisticated sky detection algorithm due to varying sky and cloud conditions. We used a modified Sobel filter algorithm for edge detection and a procedure developed by Laungrungthip, McKinnon, Churcher and Unsworth (2008). We then generated Google Earth fisheye photos at the Google Street View locations, using a camera height of 2.5 m to approximate the height of a Street View car. A comparison of SVFs calculated from Google Earth and Google Street View yielded an average difference in SVF of 0.022 with a standard deviation of 0.084. The largest differences in SVF were caused by two reasons. First, the Google Street View panoramas were acquired more recently than the Google Earth 3D mesh for Phoenix, which was generated several years ago. Thus, some buildings exist in Street View, but not in Google Earth, and vice versa. Second, Google Street View offers panoramas of building interiors that cannot be rendered in Google Earth. Filtering out 2,579 indoor panoramas and extreme cases of time discrepancies yielded a 0.01 average difference in SVF with a 0.028 standard deviation. This error is minimal and we conclude that the rendered output of Google Earth yields adequate results. We evaluated the accuracy of the SVF calculations by computing the SVFs of 527 randomly selected Google Earth fisheye images in the Phoenix metropolitan area using our implementation of Chapman et al. (2001), the RayMan Pro model v2.1 by Matzarakis et al. (2007Matzarakis et al. ( , 2010, the SkyViewFactor-Calculator v1.1 by Holmer et al. (2001), and the unweighted, naive approach of counting pixels. Since the SkyViewFactor-Calculator uses the well-established Steyn-method (Steyn, 1980), we chose the Holmer et al. SVF implementation as reference. As shown in Figure 3, our implementation of Chapman et al. (2001) produces SVFs that are not significantly different from the well-established Steyn-method. We confirm the findings of Hämmerle, Gál, Unger and Matzarakis (2011), showing that the RayMan model significantly underestimates SVFs, especially in the midrange, when Lambert's law is not considered for the pixel weighting. Lastly, simply calculating the ratio between sky and non-sky pixels yields inaccurate results, since this approach does not account for angular distortion.

High-Resolution Sky View Factor Maps in 3D
To illustrate the spatial variability of horizon limitations in urban areas, we created SVF maps at 5 m resolution and 1.1 m height from synthetic Google Earth fisheye photos for two contrasting neighborhoods in the Phoenix metropolitan area-a residential area in the City of Phoenix (Ahwatukee, Lakewood community) and Phoenix Downtown (Figure 4). The residential subdivision is a neighborhood with detached single family homes, approximately 2.4 km by 1.8 km, and can be classified as an Open Lowrise Local Climate Zone (Stewart & Oke, 2012). The Downtown area is 2 km by 3 km and classified Open to Compact Highrise. The SVF maps were created in ArcGIS and exported as KML for display in Google Earth, clamped to the ground, with 3D terrain activated. While the core Downtown area exhibits low SVFs (< 0.40) near office buildings, SVFs in the central business district are generally high due to wide streets (number of fisheyes: 168,266; mean SVF: 0.76; standard deviation: 0.17). The Ahwatukee suburb is characterized by even higher SVFs (number of fisheyes: 97,393; mean SVF: 0.86; standard deviation: 0.14), except to the northwest, where a 3-story apartment complex lowers SVFs to 0.50. The close-up views of the areas clearly highlight the importance of trees for SVF calculations.

Case Study: Thermal Comfort Maps for Pedestrian Routing
We demonstrate the utility of our synthetic fisheye approach through a case study that highlights how urban form and vegetation impacts thermal comfort and walkability. As a study area, we chose Arizona State University's main campus, located in the City of Tempe, Arizona. Tempe is an ideal urban area for heat stress studies, because it is located in the Sonoran Desert and has a semi-arid climate with hot and dry summers. Average maximum air temperature peaks at 40.4°C between June and August, and monthly precipitation is less than 1 mm in June (Western Regional Climate Center, 2016). Most of Arizona State University's Tempe campus is designated as a walk-only zone during weekdays from 8:00h to 16:00h; no one may ride, drive, or park wheeled vehicles. With over 50,000 students and faculty on campus, increasing pedestrian thermal comfort through heat mitigation measures is especially important during the summer months. For this study, we selected a 3 × 3 Google Maps tile area (ca. 750 m × 750 m) that encompasses the north-west corner of the main campus and corresponds to an open low-to midrise Local Climate Zone with a mean SVF of 0.52 ± 0.18 ( Figure 5).
We ran the automated version of RayMan for 19,600 synthetic fisheye photos in the study area at 1.1 m height on a 5 m grid for August 7, 2016, a week before classes started. Weather conditions were hot and clear, with a daily maximum temperature of 43°C, minimum temperature of 30°C, average dew point of 14°C, and light wind (< 1.5 ms −1 ). As meteorological model input, we used observations from an hourly microclimate transect that was conducted on campus between 8:00h and 19:00h on August 7, 2016. Air temperature, relative humidity, and wind speed were logged at 1.5 m and 2 s intervals during the transect, linearly time-detrended to the full hour, and spatially averaged to yield representative mean values for the study area. For the thermal comfort routing application, we focused on 9:00h in the morning and 17:00h in the late afternoon, shortly after peak air tem-perature, and assumed a walking 35 years old male in a t-shirt and shorts (Table 1).

Thermal Comfort Model Performance
The fine-scale modeling results for Arizona State University's campus highlight direct radiation as an important driver of MRT. Shade, i.e. the absence of direct incom- ing shortwave radiation, causes discontinuities in MRT, illustrated by two separate color-schemes for shaded and unshaded locations on the map (Figure 6). Shaded locations range from 49.0°C to 50.0°C MRT (49.4°C to 50.1°C MRT) in the morning (afternoon), while sun-exposed areas are upwards of 58.6°C MRT (57.2°C MRT). The map further suggests that MRT is slightly increased near vertical urban features. Although an increase in emitted longwave radiation is expected from sun-facing walls that are or have been exposed to direct radiation, and therefore become a source of radiant heating, the same does not necessarily apply to permanently shaded surfaces and trees. This is a known limitation of the RayMan model; it assumes the same thermal properties for all solid surfaces in the fisheye image and the lower hemisphere, which can lead to an overestimation of longwave radiation from surfaces. To test model performance, we compared the Ray-Man simulated MRT results to six-directional radiant flux density observations from an on-campus field measurement campaign on August 7, 2016 ( Figure 6). 3D radiant flux densities were sampled at 20 locations across cam-pus every hour from 8:00h to 19:00h using three Hukseflux 4 component net radiometers mounted on a mobile instrument platform at 1.1 m height above ground. The sampling sites were traversed within 45 minutes, including a one minute stop at each location to account for sensor lag. MRT was calculated from the observations following ISO 7726 (1998). The sites were selected to span a wide variety of sun-exposure and surface cover combinations (Table 2). Exposure settings include open sites, shade from trees, east-west canyons, and a building overhang; surface cover varies between concrete, grass, soil, and gravel.
A comparison of modeled and observed MRT shows considerable differences for most locations (Table 2). Although RayMan explains 84.4% of the variance in MRT, the model consistently overestimates shaded and underestimates sun-exposed sites (RMSE=7.33; MBE=3.69; MAE=6.83;d=0.72). This indicates that the model accurately captures the differences in MRT between shaded and sun-exposed locations due to incoming shortwave radiation, but has difficulties to resolve the heterogeneity of urban form. Our results are in agreement with shaded sun-exposed shaded sun-exposed b Figure 6. Simulated mean radiant temperature (MRT) map of the study site for 09:00h (a) and 17:00h (b) on August 7, 2016, with on-site mean radiant temperature observations. Thorsson et al. (2007) who found that RayMan underestimates sun-exposed sites under clear conditions in Göteborg, Sweden, and with Lee and Mayer (2016) who found that RayMan overestimates low and underestimates high MRT observations in Freiburg, Germany. Yet, RayMan performed better in our setting than during a field experiment in Glasgow by Krüger, Minella and Matzarakis (2014) who reported RMSE values upwards of 10°C in a comparison of various methods to estimate MRT. Despite the divergence between observed and modeled MRT values, we conclude that RayMan yields reasonable estimates to demonstrate the utility of our thermal comfort routing application. Improving MRT simulations is beyond the scope of this paper, but implementing a refined radiation scheme for our synthetic fisheye approach is part of ongoing work.

Pedestrian Routing
Based on the RayMan model output for PET, we suggest walking routes across campus that are tailored to thermal comfort preferences. We employed the Dijkstra (1959) algorithm to calculate the shortest path between two locations in the study area and incorporated a weighting that accounts for PET preferences of an individual. The "comfort over distance" parameter α controls the importance of thermal comfort for navigation, i.e. α = 0 yields the shortest path and α → ∞ yields the most comfortable path, minimizing average PET of a route. For our case study, we selected a route starting at the Ira A. Fulton Schools of Engineering Brickyard north-west of the Tempe campus and ending at the Memorial Union in the campus center. The Brickyard building complex is located on Mill Avenue, a pedestrian-friendly street in the heart of Tempe with many restaurants, cafes, bars, and shops. The Memorial Union offers student support services and is a major activity hub at the campus core. We calculated the shortest path (α = 0), a more comfortable path (α = 2), and the most comfortable path (α → ∞) from the Brickyard to the Memorial Union for August 7, 2016, 9:00h and 17:00h (Figure 7). With increasing willingness to walk further, optimal comfort routes divert from the shortest path to navigate pedestrians through shade from buildings and trees instead of exposing them to the sun. Routes also vary by time of day, as the sun position changes shade patterns from buildings and trees. At 9:00h, shade is generated to the west of urban features and the most comfortable route leads through a tree-lined north-south canyon between midrise buildings. At a walking speed of 1.4 ms −1 , the route is 65 m and 48 s longer than the shortest route (995 m, 11 min and 48 s), lowers sun exposure by 7.5%, and increases average thermal comfort from 43.4 to 42.9°C PET (Table 3). At 17:00h, when shade is generated to the east at a low sun angle, the most comfortable path leads along the east side of a group of high-rise buildings through an almost completely shaded north-south canyon. The route is 97 m longer than the shortest path (997 m, 11 min and 54 s), adding 1 min and 6 s to the trip but reducing sun exposure by 10%. shaded sun-exposed shaded sun-exposed  Considering the hot dry thermal conditions on August 7, detours from the shortest path are short and reasonable, and at the same time significantly reduce sun exposure, especially in the late afternoon when sun angles are low. Thermal comfort differences in the shortest and most comfortable path are expected to be more pronounced for longer distances and in more heterogeneous urban forms. Results will also differ in other climatic conditions where humidity or wind speed might play a more significant role in determining thermal comfort and during the winter when deciduous trees have lost their leaves.

Discussion and Conclusions
We developed a methodology to generate synthetic fisheye images based on Google Earth 3D data for urban areas at fine spatial resolution. The hemispherical im-ages can be used to derive urban form and climate metrics such as SVF, duration of sun exposure, MRT, and the thermal comfort index PET. Our approach is novel in that it combines several advantages of existing approaches. First, urban form and climate metrics can be calculated automatically for large urban areas independent of available 3D building databases, DSMs, or DEMs. Second, trees are included in the 3D urban geometry; trees are important shade providers at the pedestrian level that must be considered in fine-scale outdoor thermal comfort applications. Our synthetic fisheye images compared well to real world hemispherical photos retrieved from Google Street View, but are currently more difficult to generate, because the most recent Google Earth API does not support direct access.
The presented SVF approach integrates well with existing thermal comfort models that use fisheye photographs to model radiation fluxes. However, refinement of the physical properties and sun-exposure of the solid surfaces in those fisheye-based models is needed to resolve the heterogeneity in urban areas and estimate thermal comfort more accurately.
In a heat mapping case study, we demonstrated the utility of our synthesized fisheye images for pedestrian thermal comfort routing on Arizona State University's Tempe campus. We introduced the "comfort over distance" parameter α that minimizes average PET exposure for a route based on a pedestrian's willingness to walk further. Integrating personalized thermal comfort preferences as a weighting factor, we estimated a pedestrian's exposure time to direct sun given a route, walking speed, and overall thermal comfort. The current routing algorithm minimizes average PET with increasing α, but the duration, frequency, and magnitude of personal exposure to heat affects thermal comfort as well (Kuras et al., in press). The time spent walking above a certain PET threshold presents an alternative metric similar to the Extreme Degree-Minute approach employed by Karner, Hondula and Vanos (2015) that could be implemented as weighting factor. Our algorithm can further be extended to provide more individualized thermal comfort routes incorporating multiple weighting factors, e.g., traffic-related air pollution and accessibility to cooling facilities such as water fountains, shops, and cooling centers.
Our individualized thermal comfort maps demonstrate how urban form, represented here by the SVF, impacts walkability and pedestrian outdoor thermal comfort. As navigational aid, these maps have the potential to significantly reduce thermal stress on pedestrians. They can help the public to better prepare for outdoor activities by visualizing how thermal conditions "feel" and how they vary within the urban area. Thermal comfort maps can also provide useful information for urban planners. They can be employed to assess neighborhood walkability, determine hotspots, and support heat hazard mitigation efforts, e.g., inform targeted tree planting in cities to maximize thermal comfort outcomes.
Thermal comfort outcomes are significantly influenced by how we design cities, i.e. the layout and types of buildings, streets, and vegetation. Thermal comfort maps from synthetic fisheye photos provide important insights that, integrated into urban planning processes, can inform future city design to create more climatesensitive outdoor spaces.