def save(self, collection):
    if (not isinstance(collection, Collection)):
        print('Expected Collection, got {}'.format(collection))
        raise TypeError
    if (not isinstance(collection.class_type, Footprint.__class__)):
        print('Collection should be made of Footprints, got {}'.format(collection.class_type))
        raise AttributeError
    r = []
    for f in collection:
        r.append(f.polygon)
    dict = {'name': [0 for x in r], 'geometry': r}
    df = gpd.GeoDataFrame(dict)
    df.to_file('{}.shp'.format(self.name))
def save(self, collection):
    if (not isinstance(collection, Collection)):
        print('Expected Collection, got {}'.format(collection))
        raise TypeError
    if (not isinstance(collection.class_type, Footprint.__class__)):
        print('Collection should be made of Footprints, got {}'.format(collection.class_type))
        raise AttributeError
    r = []
    for f in collection:
        r.append(f.polygon)
    dict = {'name': [0 for x in r], 'geometry': r}
    df = gpd.GeoDataFrame(dict)
    df.to_file('{}.shp'.format(self.name))