Skip to content

lut_shapefile

LutShapefile(bounds, params)

Bases: LutDataLoader

add_default_params(params)

Set default values for LUT dataloader. Only unique addition over the regular abstracted add_default_params is the data_name

Parameters:

Name Type Description Default
params dict

Dictionary containing attributes that are required for the LUT being loaded.

required

Returns:

Type Description
dict

Dictionary of attributes the dataloader will require, completed with default values if not provided in config.

import_data(bounds)

Import a list of .shp files, assign regions a value specified in config params, regions outside this are numpy nan values.

Parameters:

Name Type Description Default
bounds Boundary

Initial boundary to limit the dataset to

required

Returns:

Name Type Description
exclusion_df DataFrame

Dataframe of polygons with value specified in config. DataFrame has columns 'geometry' and data_name ('dummy_data' by default)