aoi = gpd.read_file('../data/admin_areas/ph_admin_bbox_wgs84.geojson')Download Rasters
utilities for conveniently downloading rasters
phl_matched20180501 = search_dates_aoi(aoi, date_param='20180501')CPU times: user 44.3 ms, sys: 986 ms, total: 1.03 s
Wall time: 1.03 s
sorted_results = compute_overlaps(aoi,phl_matched20180501)CPU times: user 56.6 ms, sys: 2.6 ms, total: 59.2 ms
Wall time: 55.6 ms
cfg = Config('../data/ntlights-bigfiles','ntlights.ini',save=False)
fdownload = FastDownload(cfg, base='../data/ntlights-bigfiles',archive=folder)folder, vflag_href, image_href = sorted_results.iloc[0].folder, sorted_results.iloc[0].vflag_href, sorted_results.iloc[0].asset_hreffdownload.download(vflag_href)
100.09% [4456448/4452282 00:03<00:00]
Path('/home/butch2/play/devpost/ntlights-processing-utils/nbs/../data/ntlights-bigfiles/npp_201805/npp_d20180501_t1639558_e1645362_b33728.vflag.co.tif')
get_path_column
get_path_column (raster_type)
get_href_path
get_href_path (o, raster_type)
download_path_column
download_path_column (o, raster_type, dest)
download_items
download_items (items_df, dest='data', raster_type='rade9.co.tif')
top2_items = sorted_results[:2].copy()top2_items = download_items(top2_items, dest='../data/ntlights-bigfiles')top2_items.columns.valuesarray(['href', 'item_href', 'stem', 'suffix', 'base_url', 'folder',
'product_id', 'start_date', 'first_scantime', 'end_scantime',
'orbital_nbr', 'create_datetime', 'data_origin', 'data_domain',
'vflag_file', 'vflag_href', 'cache_stem', 'asset_href', 'geometry',
'section_area', 'intersect_area_sum', 'pct_covered', 'image_path'],
dtype=object)