ladybug_vtk.metadata module

class ladybug_vtk.metadata.PolyDataMetaData(legend_parameters=None, data_type=None, unit=None, per_face=True)[source]

Bases: VisualizationMetaData

Metadata for a PolyData object.

Parameters:
  • legend_parameters – An Optional LegendParameters object to override default parameters of the legend. None indicates that default legend parameters will be used. (Default: None).

  • data_type – Optional DataType from the ladybug datatype subpackage (ie. Temperature()) , which will be used to assign default legend properties. If None, the legend associated with this object will contain no units unless a unit below is specified. (Default: None).

  • unit – Optional text string for the units of the values. (ie. “C”). If None or empty, the default units of the data_type will be used. If no data type is specified in this case, this will simply be an empty string. (Default: None).

  • per_face – A Boolean to indicate if the data is per cell or per point. In most cases except for sensor points that are loaded as sensors the data are provided per cell.

ToString()

Overwrite .NET ToString.

classmethod from_dict(data)

Create VisualizationMetaData from a dictionary.

Parameters:

data – A python dictionary in the following format

{
"type": "VisualizationMetaData",
"legend_parameters": {},  # optional LegendParameter specification
"data_type": {},  # optional DataType object
"unit": "C"  # optional text for the units
}
to_dict()

Get visualization data as a dictionary.

to_vtk_metadata()[source]
property data_type

Get the data_type input to this object (if it exists).

property legend_parameters

Get the legend parameters assigned to this data set.

property unit

Get the unit input to this object (if it exists).

property user_data

Get or set an optional dictionary for additional meta data for this object.

This will be None until it has been set. All keys and values of this dictionary should be of a standard Python type to ensure correct serialization of the object to/from JSON (eg. str, float, int, list, dict)