def calculate_area_per_pixel(resolution):
    """
    Takes a resolution in metres and return the area of that
    pixel in square kilometres.
    """
    
    pixel_length = resolution  # in metres
    m_per_km = 1000  # conversion from metres to kilometres
    area_per_pixel = pixel_length**2 / m_per_km**2
    return area_per_pixel