#NEWLINE# @ staticmethod #NEWLINE# def get_benchmark_footprints( dset_dict , benchmark_dir ) : #NEWLINE# #INDENT# 'Given a dataset_dict, parse the list of files in benchmark directory\n        and generate a list of tile footprints.' #NEWLINE# sat = dset_dict [ 'satellite_tag' ] . upper ( ) #NEWLINE# sensor = dset_dict [ 'sensor_name' ] . upper ( ) #NEWLINE# level = dset_dict [ 'processing_level' ] #NEWLINE# ymd_str = re . match ( '(.*)T' , dset_dict [ 'start_datetime' ] . isoformat ( ) ) . group ( 1 ) #NEWLINE# pattern = re . compile ( ( '%s_%s_%s_(?P<xindex>[-]*\\d+)_(?P<yindex>[-]*\\d+)_.*%s.*ti[f]*$' % ( sat , m , level , ymd_str ) ) ) #NEWLINE# matchobject_list = [ re . match ( pattern , filename ) . groupdict ( ) for filename in os . listdir ( benchmark_dir ) if re . match ( pattern , filename ) ] #NEWLINE# footprints = [ ( int ( m [ 'xindex' ] ) , int ( m [ 'yindex' ] ) ) for m in matchobject_list ] #NEWLINE# return footprints