field_factory module
Define a factory to easily create the Field objects.
Todo
Implement SuperposedFieldMap.
- class FieldFactory(default_field_map_folder)[source]
Bases:
objectCreate the
Fieldand load the field maps.- Parameters:
default_field_map_folder (
Path)
- _gather_files_to_load(field_maps)[source]
Associate
FieldMapobjects using the same fields.- Parameters:
field_maps (
Collection[FieldMap]) – All theFieldMapinstances requiring aField.- Return type:
- Returns:
A dictionary where each key is a path to a field map file, and each value is a list of
FieldMapinstances that use that file.- Raises:
NotImplementedError – If a
SuperposedFieldMapis encountered, as it’s not yet supported.
- _check_uniformity_of_types(to_load)[source]
Check that for a file name, all corresp. object have same geom.
- run_all(field_maps)[source]
Generate the
Fieldobjects and store it in field maps.- Parameters:
field_maps (
Collection[FieldMap])- Return type: