gplately.PresentDayRasterManager
- class gplately.PresentDayRasterManager(data_dir='present-day-rasters', raster_manifest=None)[source]
Bases:
objectManage the present-day rasters.
- __init__(data_dir='present-day-rasters', raster_manifest=None)[source]
Constructor. Create a
PresentDayRasterManagerinstance.- Parameters:
raster_manifest – The URL to a
present_day_rasters.jsonmetadata file. Normally you don’t need to provide this parameter unless you would like to setup your own present-day raster server.data_dir – The path to a folder to save the present-day raster files.
Methods
__init__([data_dir, raster_manifest])Constructor.
get_raster(_name[, width, height, bbox, ...])Download a raster file by name, save the raster file in
self.data_dirand return the local path to the raster file.is_wms(_name[, check_raster_avail_flag])Return
Trueif the raster is served byWeb Map Service, otherwiseFalseReturn a list of available present-day rasters.
set_data_dir(data_dir)Set a new data folder to save the present-day rasters.
Attributes
The metadata of rasters.
- get_raster(_name: str, width=1800, height=800, bbox=[-180, -80, 180, 80], large_file_hint=True)[source]
Download a raster file by name, save the raster file in
self.data_dirand return the local path to the raster file.Call
list_present_day_rasters()to see a list of available present-day raster names.