Wednesday, June 1, 2016

Determining the Age of Bing Maps Imagery


At work, we use Bing Maps to provide users a way of visualizing their home and aiding them to select where their roof is for the purposes of calculating roof dimensions for the potential installation of solar panels. We don't use the image itself for this calculation; we use the location. The map just provides a visual aid so that the user can say "this is where the roof of my house is."
Why do we use Bing Maps instead of Google Maps? In a word - price.

The Problem

Bing provides different imagery sets with the main ones being "Aerial" and "Birdseye" where "Birdseye" has the advantage of providing different "oblique-angle" images for each area. The problem is that not all Bing Maps images are created equal. In some areas of the US, the Birdseye image can be much older than the Aerial image, or vice versa. Depending on where a customer's address is, one image set could be much older than the other. This can result in the user looking at a map of trees or a desert with their house nowhere in sight. The user would have to guess which cactus is closest to where they think their roof-line might be.

Bing to the Rescue (or not)

Bing provides an API where you can retrieve the age of the imagery for a given imagery set. You can do this by using the API to retrieve the Imagery Metadata. The idea would then be to get the metadata of both the Birdseye and Aerial imagery and use the newest one to determine which map to display to the user. However, there is another problem. Although Bing provides this nice API to retrieve the metadata which includes the imagery age by way of two properties: "vintageStart" and "vintageEnd", these properties are not returned for the Birdseye imagery. So, the imagery metadata is completely useless for trying to programmatically determine which imagery set is newer. Thanks, Microsoft!

The Solution

Well, we didn't find a solution, other than to add a configuration setting to determine which imagery set to use. However, a colleague of mine did suggest a solution. The only problem now is to somehow implement this flowchart using C#.
Map Age Guide
Map Age Guide