Data Resources

Data objects that hold numeric attributes and mapping to elements

../_images/lfview_resources_spatial_data.png

Doc links: _BaseData _BaseResource _BaseUIDModel DataBasic DataCategory HasProperties

class lfview.resources.spatial.data._BaseData(**kwargs)

Base class for data objects

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.data.DataBasic(**kwargs)

Basic numeric attribute data

This data type is defined by an array that directly maps to an element geometry. For no-data values, use NaN.

Currently, this only accepts 1D arrays and, when applied to a grid, the array must be stored in row-major order.

Required Properties:

  • array (Array instance or UID): Array of numeric values at locations on an element geometry, specified by the location property, an instance of Array or a valid uid property of that class
  • location (StringChoice): Location of the data on geometry, either “nodes” or “cells”
  • mappings (a list of MappingContinuous instance or UID, a list of MappingDiscrete instance or UID): Mappings associated with the data, a list (each item is an instance of MappingContinuous or a valid uid property of that class or an instance of MappingDiscrete or a valid uid property of that class) with length between 0 and 100

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string
class lfview.resources.spatial.data.DataCategory(**kwargs)

Category attribute data

This data type requires the array to be integer values that that correspond to the indices defined by the categories mapping object. Any values in the array that do not have a corresponding category index are assumed to be no-data.

Similar to DataBasic, arrays must be 1D and row-major ordered when applied to grids.

Required Properties:

  • array (Array instance or UID): Array of numeric values at locations on an element geometry, specified by the location property, an instance of Array or a valid uid property of that class
  • categories (MappingCategory instance or UID): Category mappings that define indices and corresponding data values, an instance of MappingCategory or a valid uid property of that class
  • location (StringChoice): Location of the data on geometry, either “nodes” or “cells”
  • mappings (a list of MappingCategory instance or UID): Other mappings associated with the categories, a list (each item is an instance of MappingCategory or a valid uid property of that class) with length between 0 and 100

Optional Properties:

  • description (ShortString): Description of resource, a unicode string and less than 5000 characters
  • name (ShortString): Name or title of resource, a unicode string and less than 300 characters
  • uid (String): Unique object identifier, a unicode string