def geojson_to_polygons(geojson):
    """
    Convert geojson as generated by geojs's annotation layer.

    :param geojson: geojson record.
    :returns: an array of polygons, each of which is an array of points.
    """
    polys = []
    for feature in geojson['features']:
        if feature.get('geometry', {}).get('type') == 'Polygon':
            polys.append(feature['geometry']['coordinates'])
    return polys