"A future where gardens bring joy and inspiration to all of society".
The above quote is our teams' core mission statement but in order to include the broad range of people that make up our society, young and old, able-bodied and not, we must consider accessibility as an important factor in what we do as a team.
In both our website and app, we make available a large number of garden profiles, pages that aim to inspire and inform potential garden visitors. These pages display photos and videos of the garden as well as information such as location and opening hours. During a recent discussion within the team about the informational needs of garden visitors, a user story was identified that described a person of limited mobility and the need to know more about the accessibility of a garden before visiting. We imagined users with questions such as;
"Is this garden wheelchair accessible?""Are there a lot of hills or uneven terrain?""How much of the garden will I be able to comfortably get around?"
These questions motivated the exploration of new ideas at Candide's monthly Hack Day; a day which is taken for the whole company to experiment with ideas and learn new things, both technical and non-technical.
The crux of the idea was to use publicly available data of the UK's topography and use it to precisely measure and visualise the "hilliness" or terrain of a particular garden. Considering that a quick look at an OS map or even the landscape itself would probably give you a good enough estimate, this may seem like overkill. But us engineers like a good solid, inarguable number, so to be able to look at two numbers side by side and definitively say "Yes, this garden has rougher terrain than this other one" sounded like a fun experiment for this particular Friday.
The data used for this experiment was made up of LiDAR scans, kindly made publicly available by the UK's National LiDAR Programme. LiDAR, for the uninitiated, stands for Light Detection And Ranging and is a method of measuring distances using a laser. Light from the laser travels until it hits a target object and then the time taken for its return is used to figure out how far away that object is. Due to the fairly speedy nature of light, and the precision of a laser, this measurement can be repeated many times at many points across a surface within a short space of time. Light emitted from lasers can also travel great distances with little distortion, which means that LiDAR is an ideal way to measure the surface of say, a country, by flying a plane overhead with a LiDAR scanner attached. The National LiDAR Programme has done just that for more than 85% of the surface of England.
What this means for us is that we can download high-res heightmaps of almost the entire country. Below is a heightmap of the area around The Eden Project in Cornwall, lighter areas are higher up and darker areas are lower.
To do something useful with these heightmaps, they were imported into an amazing piece of open-source software called QGIS. QGIS is a "geographic information system" application for viewing, editing and analysing geospatial data. As Microsoft Word is to text, QGIS is to maps. By importing the heightmaps and selecting the right coordinate system they could be overlayed on a regular OpenStreetMaps map or Google Maps satellite view.
From here, multiple heightmaps could be stitched together to cover a larger area. This was necessary because The Eden Project fell at the boundaries of four separate heightmaps. Once they had been combined they could essentially be 'cropped' to the area just surrounding the gardens.
At this point, the height maps are ready to analyse using QGIS's built-in tools, but before we do that we can use a neat trick to visualise what we have a little better. That trick is called a Hillshade, which takes the heightmap we have and produces a beautifully detailed view of the area by emulating a light source, casting shadows at a 45-degree angle. The result allows us to see that buried in the heightmap's abstract gradients were the familiar shapes of The Eden Project's domed biomes all along!
Our goal, a measurement of the "hilliness" of a garden, can be attempted by computing what QGIS calls a Terrain Ruggedness Index (TRI). TRI is a calculation that can be made on an area which at its most basic, compares the elevation value of a central point to the elevation of its surrounding points. QGIS allows us to select the heightmap in question and compute a number that represents the area's TRI. Below is an interpretation of what a particular TRI score means:
- "0-80 meters; considered to represent a level terrain surface;
- 81-116 meters; represents a nearly level surface;
- 117-161 meters; a slightly rugged surface;
- 162-239 meters; an intermediately rugged surface;
- 240-497 meters; a moderately rugged;
- 498-958 meters; a highly rugged;
- 959-4367 meters; an extremely rugged surface."
(NB. Everest is 8,848 m)
When running through this calculation, our Eden Project heightmap produces a value of 63meters, putting it squarely in the "level terrain" category. The Eden Project sits nestled within a reclaimed china clay pit, so this may seem low, so put it in perspective, when analysed, the Rocky Mountains rarely produced values over 400m. And what is rugged terrain on the rolling hills of Cornwall is unlikely to be rugged on the scale of a mountain range. To better understand our value and to be more scientific about our process we should repeat this process for a number of gardens and see if the comparisons between their scores line up with what we know. With more data from multiple gardens we might also produce an interpretation of the range of values that is more suitable in the context of gardens.
What the TRI score doesn’t give us is an idea of the terrain of specific areas or the size of the area as a whole. It doesn’t indicate if the ground is stepped or sloped, or if one half is level and the other rugged. To try and answer these questions we can use the same data but in a slightly different way.
A second method of estimating a garden's terrain might be to simply look at it. But how can we allow users to get a good enough perspective on the size and shape of a garden from the comfort of their home? OS maps with their overlaid contour lines give us some idea of an area's topography, but require experience to be able to visualise at the right scale. They are limited by being a fixed scale and by being two dimensional.
The most intuitive way to view topographic data may be to create a full 3D visualisation. Google Earth does a great job at this but their data is not publicly available and uses expensive photogrammetry techniques, stitching together photos taken from many angles from a plane flown overhead. We can attempt an alternative method using our heightmaps, a satellite view and by using the open-source 3D modelling software, Blender.
In Blender, we can create a 2D plane that corresponds to the area on the map we wish to visualise. We can then apply a "displacement modifier" to this 2D plane that corresponds to our heightmap. This shows us the shape of the area in 3D but at this point it is hard to discern one feature from another.
To solve this we can apply a screenshot of the area in google's satellite view as a texture. Projecting the 2D satellite image onto the 3D surface means that the area, it's buildings, paths, trees and shrubbery are all clear to see.
The resulting 3D model gives us a good idea of the shape and size of a garden. With a high enough resolution of both LiDAR data and satellite imagery, it may also allow us to identify features such as stairs and different types of terrain (e.g. gravel path or earth track). Beyond accessibility, this kind of visualisation may help all visitors better understand the places they can go and hopefully inspire them to visit.
With that, we have two potential and perhaps complementary methods to assess a garden's terrain. The Terrain Ruggedness Index method produces a score of sorts, allowing us to rank and sort gardens according to this score. The other method produces a visual aid, giving users a more intuitive view of a garden's size and shape. Further validation of both ideas may be tackled on a future Hack Day by repeating this process for multiple gardens of different types. I look forward to exploring them further.