Is there any more efficient/faster way to query a mosaic dataset raster catalog (footprints) for records matching an AOI polygon?
This implementation gets slower the larger the AOI polygon is.
import arcpy import timeit fgdb_path = 'H:/MY/FGDB/Rasters.gdb' md_name = 'CIB1' md_path = fgdb_path + '/' + md_name md_cat_path = fgdb_path + '/AMD_' + md_name + '_CAT' aoi_fc = 'H:/MY/FGDB.gdb/AOI' out_paths = r'in_memory\paths' # Get AOI poly from FC with arcpy.da.SearchCursor(aoi_fc,'SHAPE@') as sCur: for row in sCur: aoi_poly = row start_time = timeit.default_timer() # Create OID list of MD raster footprints that the AOI overlaps/contains oid_list =  with arcpy.da.SearchCursor(md_path,['SHAPE@', 'OID@']) as sCur: for row in sCur: if aoi_poly.overlaps(row) or aoi_poly.contains(row): oid_list.append(row) elapsed = timeit.default_timer() - start_time print("Completed in " + str(elapsed))
- ArcPy w/ Pro 2.8 python3
- ArcPy w/ ArcGIS Server 10.9 python3
- Mosaic Dataset Footprint: 280K
- Footprint size: 1SqMi
- Small AOI footprint match: 10K results, 30s completion
- Large AOI footprint match: 230K results, 230s completion