#NEWLINE# def test_insert_tile_record( self ) : #NEWLINE# #INDENT# 'Test the Landsat tiling process method by comparing output to a\n        file on disk.' #NEWLINE# processing_level = 'PQA' #NEWLINE# dataset_path = TestIngest . DATASETS_TO_INGEST [ processing_level ] [ 0 ] #NEWLINE# LOGGER . info ( 'Testing Dataset %s' , dataset_path ) #NEWLINE# dset = LandsatDataset ( dataset_path ) #NEWLINE# self . collection . begin_transaction ( ) #NEWLINE# acquisition = self . collection . create_acquisition_record ( dset ) #NEWLINE# dset_record = acquisition . create_dataset_record ( dset ) #NEWLINE# ftprints = TestTileContents . get_benchmark_footprints ( dset_record . mdd , TestIngest . BENCHMARK_DIR ) #NEWLINE# LOGGER . info ( 'bench_footprints=%s' , str ( ftprints ) ) #NEWLINE# dummy_tile_type_list = dset_record . list_tile_types ( ) #NEWLINE# tile_type_id = 1 #NEWLINE# dataset_bands_dict = dset_record . get_tile_bands ( tile_type_id ) #NEWLINE# ls_bandstack = dset . stack_bands ( dataset_bands_dict ) #NEWLINE# temp_dir = os . path . join ( self . ingester . datacube . tile_root , 'ingest_temp' ) #NEWLINE# ls_bandstack . buildvrt ( temp_dir ) #NEWLINE# tile_footprint_list = dset_record . get_coverage ( tile_type_id ) #NEWLINE# LOGGER . info ( 'coverage=%s' , str ( tile_footprint_list ) ) #NEWLINE# for tile_footprint in tile_footprint_list : #NEWLINE# #INDENT# tile_contents = self . collection . create_tile_contents ( tile_type_id , tile_footprint , ls_bandstack ) #NEWLINE# LOGGER . info ( 'reprojecting for %s tile %s' , processing_level , str ( tile_footprint ) ) #NEWLINE# tile_contents . reproject ( ) #NEWLINE# if tile_contents . has_data ( ) : #NEWLINE# #INDENT# dummy_tile_record = dset_record . create_tile_record ( tile_contents ) #NEWLINE# #UNINDENT# #UNINDENT# self . collection . commit_transaction ( )