Where are all the trees?
I started writing this blog post at the beginning of 2020 (yes, I know) but it got put to one side because of global events. I've tried to check/update links but I note that some of the websites/tools may no longer be fully-functioning and/or their datasets may have moved over the past three years.
A number of years ago our Advent calendar featured the New York Tree Census. Every five years (in normal times) they ask citizens to take a census of every street tree in the city. They produce a map of 870,342 trees and publish the trees as open data on NYC Open Data (although, very understandably, they don't seem to have collected/published data during the COVID-19 pandemic). They aren't the only ones.
Over in San Francisco is a separate group created Open Tree Map who make several city-specific maps to achieve similar goals. However, although they do make it fairly easy for people to contribute data to their various maps, and provide free access to the maps, you can't download the data. So it isn't really "open" in the "open data" sense.
Outside the US there are other city-specific attempts to map trees in Edinburgh (at least 50,000 trees), London (800,000 trees), and Melbourne (70,000 trees). There are also country-wide projects such as every tree in the Netherlands and the UK's TreeZilla (The Monster Map of Trees from the Open University) where they have a map with 1,073,367 trees (550 in Leeds). Here in Leeds the Leeds Ecosystem Atmospheric & Forest (LEAF) Centre mapped trees on campus in 2019 (1400 trees). With a more global scale, NASA are also crowd-sourcing data about trees using GLOBE Observer. These are all great projects. The only trouble is that they aren't joined up and often create closed silos of data where access to the data is very restricted. It is disappointing that so many projects ask the public or local authorities to provide free data collection only for the data to be locked up and only accessible through their specific web map.
Fewer gatekeepers, fewer silos
A number of years ago, during the development of the Common Ground tool, we had lots of discussion about gatekeepers of data and data silos. We didn't want to become another silo maintaining a database of geographic assets especially when projects such as Open Street Map already do this. In a world of closed mapping they are effectively the "digital commons". The data from Open Street Map is widely distributed under an open licence (ODbL) and it can be quickly re-used in a huge variety of projects. You can also keep snapshots of their database so you don't have to be worried about losing data if they were ever to turn off their servers or shut down their APIs.
Over the past couple of years I've tried to encourage more people to contribute data directly to Open Street Map rather than give it to me. That way we (and, importantly, everyone else) can extract it as needed. But it also means that individual contributors are credited with each edit and it may encourage them to edit other aspects of Open Street Map.
There are some great tools that don't try to become new silos of data and instead just act as simpler, sometimes topic-specfic, tools to add data into Open Street Map directly under your own Open Street Map user account. A few examples include:
- StreetComplete (Android only) make it very easy to update metadata of all sorts of street-level things that have already been mapped on Open Street Map.
- HealthSites.io aim to create an online map of every health facility in the world and make the details of each location easily accessible but they do that by updating Open Street Map so that the data is automatically freely available to everyone else. This sort of data becomes particularly important with global health emergencies.
The taginfo project shows there are already over 1,036,000 trees tagged in the UK as of May 2023 (making it almost as many as in TreeZilla). So there is already a good base of trees there. Could we make it easier to add more trees and to make the metadata about each tree more complete?
Making a truly open tool
I'd been wanting to make a properly open tree census tool using Open Street Map for some time. By the end of 2019 I had almost enough skills to implement it so I started making Open Tree Logger as a demonstration of what that might look like. I only got the tool partially functioning and, unfortunately, it doesn't let you save any edits you make because, back in early 2020, we couldn't work out how to implement the required authentication (more on that below).
In my conception, a tree census tool would let any individual contributor add as much information as they could about a tree; even if that was only the location of the tree. The tool would make it easy to then find trees that still require specific types of metadata so that, for instance, an individual with a tape measure could easily find the trees that still need their circumference measured. It would let people specialise on the types of data collection they feel most comfortable with or capable of doing.
Metadata/tagging
The first step was to check if Open Street Map would be able to collect enough metadata about trees. The Open Street Map wiki lists the tags that it recommends for trees and they include:
- the genus (scientific name)
- the species (scientific name)
- if it is protected
- the circumference
- the diameter (as an alternative to circumference)
- the height
- the diameter of the crown
- leaf type
These cover a good fraction of the items that LEAF were recording in their survey on the University of Leeds campus (see Appendix i).
As a lay person I know that I can't recognise that many trees so I knew that adding the genus/species was going to be hard for most people. To help people do that, I built a tree identifier tool that adapted a PDF from the Natural History Museum. These days it may be possible to use tools such as Pl@ntNet to identify trees from a photo.
I also started experimenting with a tool to calculate the height of a tree. It asks someone to walk 10m from the trunk of the tree, turn to face the tree, then use their phone camera to mark the base of the tree and the top of the tree. It then uses the change in angle of their phone to calculate the height of the tree.
Using the API
For the tool to find out about existing trees and to save new tree information I looked up the Open Street Map API. The documentation was fairly thorough and I was able to construct the appropriate messages. However, I then ran into the problem of authentication. To be able to save anything to Open Street Map, I needed to be able to use OAuth. I followed the steps of creating an "application" by logging into Open Street Map, visiting my OAuth settings, and creating a new application. So far so good. I even found a Javascript library - osm-auth - that made it possible to talk OAuth correctly. However, I was uncomfortable with the fact that osm-auth made the application's secret key publicly visible. Giles and I started looking at doing the authentication on the server-side but we ran into difficulties with OAuth 1.0 and then the COVID-19 pandemic hit.
Where are we now?
As Open Street Map have recently announced they are going to move from OAuth 1.0a to OAuth 2.0, it may be that we can revisit the authentication issues so that our Open Tree Logger can actually save edits. But, since we did our experiment, MapComplete (by OSM Belgium) have created various topic-specific editing tools including MapComplete: Trees which lets you update individual trees in Open Street Map.