Python API Create a new DataDefinition - 52North/IlwisCore GitHub Wiki

In IlwisObjects the DataDefinition defines, what kind of data is contained in the object and which kind of data may be put into it. For this definiton it relies on a Domain and the according Range. All possibilities can be seen in the following table. Click on the name to get redirected to the according documentation (so far available).

Domain Range
NumericDomain NumericRange
ItemDomain NumericItemRangeThematicRangeNamedItemRange
TimeDomain TimeInterval
ColorDomain ContinousColorRange
TextDomain String

Creating a new DataDefinition can now simply be done by passing the domain and optionally the range to it's constructor.

 #Create range
 nr = NumericRange(0.0, 10000.0)
 #Create empty Numeric Domain
 numdom = NumericDomain()
 #Set range of new domain
 numdom.setRange(nr)

 datdef = DataDefinition(numdom, nr)