gplately.PresentDayRasterManager
- class gplately.PresentDayRasterManager(data_dir='present-day-rasters', raster_manifest=None)[source]
Bases:
object
Manage the present-day rasters.
- __init__(data_dir='present-day-rasters', raster_manifest=None)[source]
Constructor. Create a
PresentDayRasterManager
instance.- Parameters:
raster_manifest – The URL to a
present_day_rasters.json
metadata 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_dir
and return the local path to the raster file.is_wms
(_name[, check_raster_avail_flag])Return
True
if the raster is served byWeb Map Service
, otherwiseFalse
Return 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_dir
and return the local path to the raster file.Call
list_present_day_rasters()
to see a list of available present-day raster names.