7.5.3.3. LUT GeoJSON Dataloader

The scalar CSV dataloader is designed to take any geojson file and cast it into a data source for mesh construction. It was primarily used in testing for loading dummy data to test performance. When using this dataloader, a value should be provided in the mesh config file that specifies the value and data_name that the polygons save. The keyword in the config params is ‘value’.

Name in config: 'lut_geojson'

class meshiphi.dataloaders.lut.lut_geojson.LutGeoJSON(bounds, params)
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:

params (dict) – Dictionary containing attributes that are required for the LUT being loaded.

Returns:

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

Return type:

(dict)

import_data(bounds)

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

Parameters:

bounds (Boundary) – Initial boundary to limit the dataset to

Returns:

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

Return type:

exclusion_df (pd.DataFrame)