Trees may not be the first thing that comes to mind when you picture big cities, but they're an essential part of many urban landscapes. By maintaining a healthy tree population, a city can clean the air, provide shade to buildings, and improve the quality of life of its residents.

To quantify the impact trees have, officials first need to keep track of how many grow within city limits—a task that's harder than it sounds. Even with thousands of volunteers working on the ground, tallying all the trees in a city like New York can take years, according to City Lab, and such surveys often don't account for the trees growing in parks or on private property. Using artificial intelligence, researchers at the geospatial analytics startup Descartes Labs have found a way to map all the trees in major cities without taking to the streets.

To make the New York tree map below, Descartes programmed a machine learning model to identify tree canopies from satellite images. This isn't as easy as pinpointing green spots: The program had to be taught to distinguish trees from other greenery, like grass and shrubs, using artificial intelligence. This sets it apart from other tools used to map vegetation like the Normalized Difference Vegetation Index (NDVI), which only accounts for light wavelengths, not height.

Tim Wallace/Descartes Labs

When applied to New York, the tree-mapping technology provides a different view of the city. Some of the most heavily trafficked areas, like downtown Brooklyn and Times Square, are blank spaces on the map. Not surprisingly, parks like Forest Park in Queens and Central Park in Manhattan have the densest concentrations of trees, but some affluent neighborhoods, like the West Village and the Upper East Side, also have plenty of greenery.

New York's vegetation may be impressive by some city's standard, but it's nothing compared to what it was 400 years ago. Here's what Manhattan looked like in 1609.

[h/t City Lab]