def get(self): #print(subprocess.check_output('ls',shell=True)) # do stuff maap = MAAP('./search/maap-py/maap.cfg') #maap = MAAP('/home/ubuntu/extensions/search/search/maap-py/maap.cfg') query_result = '' try: kw = self.get_argument('keyword', '') results = maap.searchCollection(keyword=kw) query_result = self.printResultsToString(results) # query_result = results except: kw = '' try: instr = self.get_argument('instrument', '') results = maap.searchCollection(instrument=instr) url_list = '' for res in results: url_list = url_list + res.getDownloadUrl() + '\n' query_result = url_list except: instr = '' #results = maap.searchCollection(keyword='precipitation') #granules = maap.searchGranule(short_name='MOD11A1') self.finish({"collections_found": query_result})
def get(self): maap = MAAP(PATH_TO_MAAP_CFG) json_obj = self.get_argument('json_obj', '') print("json obj", json_obj) query_string = maap.getCallFromEarthdataQuery(json_obj) print("Response is: ", query_string) self.finish({"query_string": query_string})
def setUpClass(cls): config_file_path = "./maap.cfg" cls.maap = MAAP() cls._test_instrument_name_uavsar = 'UAVSAR' cls._test_instrument_name_lvis= 'lvis' cls._test_track_number = '001' cls._test_ur = 'uavsar_AfriSAR_v1-cov_lopenp_14043_16008_140_001_160225-geo_cov_4-4.bin' cls._test_site_name = 'lope'
def searth_atl08(): maap = MAAP() parser = getparser() args = parser.parse_args() if args.data_dir is None or args.bbox is None: print("Needs a data dir and a bounding box. Exiting") os._exit(1) existingfiles = [file for file in os.listdir(args.data_dir)] s=maap.searchGranule(collection_concept_id="C1200116818-NASA_MAAP", bounding_box=args.bbox, limit=args.gran_limit) for f in range(len(s)): ID = s[f]['Granule']['DataGranule']['ProducerGranuleId'] if ID in existingfiles: print('file exists...') else: s[f].getLocalPath(args.data_dir)
def get(self): maap = MAAP() cmr_query = self.get_argument('cmr_query', '') limit = str(self.get_argument('limit', '')) query_type = self.get_argument('query_type', 'granule') print("cmr_query", cmr_query) query_string = maap.getCallFromCmrUri(cmr_query, limit=limit, search=query_type) print("Response is: ", query_string) self.finish({"query_string": query_string})
def get(self): maap = MAAP(PATH_TO_MAAP_CFG) json_obj = self.get_argument('json_obj', '') print("json obj", json_obj) query_string = maap.getCallFromEarthdataQuery(json_obj) granules = eval(query_string) query_result = self.printUrls(granules) print("Response is: ", query_result) self.finish({"granule_urls": query_result})
def get(self): maap = MAAP() cmr_query = self.get_argument('cmr_query', '') limit = str(self.get_argument('limit', '')) print("cmr_query", cmr_query) query_string = maap.getCallFromCmrUri(cmr_query, limit=limit) granules = eval(query_string) query_result = self.printUrls(granules) try: print("Response is: ", query_result) except: print("Could not print results") self.finish({"granule_urls": query_result})
def get(self): #print(subprocess.check_output('ls',shell=True)) # do stuff maap = MAAP('./search/maap-py/maap.cfg') #maap = MAAP('/home/ubuntu/extensions/search/search/maap-py/maap.cfg') query_result = '' try: instr = self.get_argument('instrument', '') site = self.get_argument('sitename', '') granules = maap.searchGranule(sitename=site, instrument=instr) # print(granules) # url_list = '' # for res in granules: # url_list = url_list + res.getDownloadUrl() + '\n' query_result = self.printUrls(granules) except: instr = '' #results = maap.searchCollection(keyword='precipitation') #granules = maap.searchGranule(short_name='MOD11A1') self.finish({"granule_urls": query_result})
def setUpClass(cls): config_file_path = "./maap.cfg" cls.maap = MAAP()
def setUpClass(cls): config_file_path = "./maap.cfg" cls.maap = MAAP() cls._test_job_id = "a80434cc-3d63-4059-9ba6-2cd5ddb7d5ef"