def get_overlapping_tiles_for_dataset(self,
                                          dataset_id,
                                          delta_t=ONE_HOUR,
                                          input_tile_class_filter=None,
                                          output_tile_class_filter=None,
                                          dataset_filter=None):

        sql = ("SELECT DISTINCT o.tile_id, o.x_index, o.y_index,\n" +
               "    o.tile_type_id, o.dataset_id, o.tile_pathname,\n" +
               "    o.tile_class_id, o.tile_size, o.ctime,\n" +
               "    oa.start_datetime\n" +
               "FROM tile t\n" +
               "INNER JOIN dataset d USING (dataset_id)\n" +
               "INNER JOIN acquisition a USING (acquisition_id)\n" +
               "INNER JOIN tile o ON\n" +
               "    o.x_index = t.x_index AND\n" +
               "    o.y_index = t.y_index AND\n" +
               "    o.tile_type_id = t.tile_type_id\n" +
               "INNER JOIN dataset od ON\n" +
               "    od.dataset_id = o.dataset_id AND\n" +
               "    od.level_id = d.level_id\n" +
               "INNER JOIN acquisition oa ON\n" +
               "    oa.acquisition_id = od.acquisition_id AND\n" +
               "    oa.satellite_id = a.satellite_id\n" +
               "WHERE\n" +
               "    d.dataset_id = %(dataset_id)s\n" +
               ("    AND od.dataset_id IN %(dataset_filter)s\n" if
                dataset_filter else "") +
               ("    AND t.tile_class_id IN %(input_tile_class_filter)s\n" if
                input_tile_class_filter else "") +
               ("    AND o.tile_class_id IN %(output_tile_class_filter)s\n" if
                output_tile_class_filter else "") +
               "    AND (\n" +
               "        (oa.start_datetime BETWEEN\n" +
               "         a.start_datetime - %(delta_t)s AND\n" +
               "         a.end_datetime + %(delta_t)s)\n" +
               "     OR\n" +
               "        (oa.end_datetime BETWEEN\n" +
               "         a.start_datetime - %(delta_t)s AND\n" +
               "         a.end_datetime + %(delta_t)s)\n" +
               "    )\n" +
               "ORDER BY oa.start_datetime;"
               )
        params = {'dataset_id': dataset_id,
                  'delta_t': delta_t,
                  'input_tile_class_filter': tuple(input_tile_class_filter),
                  'output_tile_class_filter': tuple(output_tile_class_filter),
                  'dataset_filter': tuple(dataset_filter)
                  }
        result = self.execute_sql_multi(sql, params)

        overlap_dict = {}
        for record in result:
            tile_footprint = tuple(record[1:4])
            tile_record = {'tile_id': record[0],
                           'x_index': record[1],
                           'y_index': record[2],
                           'tile_type_id': record[3],
                           'dataset_id': record[4],
                           'tile_pathname': record[5],
                           'tile_class_id': record[6],
                           'tile_size': record[7],
                           'ctime': record[8]
                           }
            if tile_footprint not in overlap_dict:
                overlap_dict[tile_footprint] = []
            overlap_dict[tile_footprint].append(tile_record)

        return overlap_dict
Return a nested dictonary for the tiles overlapping a dataset.
dataset/ETHPy150Open GeoscienceAustralia/agdc/src/abstract_ingester/ingest_db_wrapper.py/IngestDBWrapper.get_overlapping_tiles_for_dataset