I have written a script based on this tutorial that access BYOC collection and creates GeoDataframe with data about all the tiles.
This is how I do this:
byoc = SentinelHubBYOC(config=config)
my_collection = byoc.get_collection(instance_id)
col_name=my_collection['name']
tile_iterator = byoc.iter_tiles(my_collection)
collect_tiles=[]
for i in np.arange(0,num_imgs,1):
collect_tiles.append(ByocTile.from_dict(next(tile_iterator)))
gdf = gpd.GeoDataFrame(collect_tiles,
geometry=[t.cover_geometry.transform(CRS.WGS84).geometry for t in collect_tiles], crs="epsg:4326")
gdf_1=gdf.reset_index()
My problem here is that I need to know the exact number of tiles I have in my collection for this script to work (the variable ānum_imgsā) . My question is, is there any wat that I can get my BYOC size within my code without use it as a known parameter?
Thanks in advanced