|
Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
#include <datadefinition.h>
Public Member Functions | |
| DataDefinition (const DataDefinition &def) | |
| DataDefinition (const IDomain &dm, Ilwis::Range *rng=0) | |
| DataDefinition () | |
| DataDefinition & | operator= (const DataDefinition &def1) |
| void | range (Ilwis::Range *vr) |
| template<typename T = Range> | |
| QSharedPointer< T > | range () const |
| IDomain | domain () const |
| void | domain (const IDomain &dom) |
| bool | isValid () const |
| bool | isCompatibleWith (const DataDefinition &def) const |
Static Public Member Functions | |
| static DataDefinition | merge (const DataDefinition &def1, const DataDefinition &def2) |
Protected Attributes | |
| IDomain | _domain |
| SPRange | _range |
| SPRange | _stretchRange |
The datadefinition class is closely related to domain. It defines the data as used by the object (whatever the object may be, e.g. a raster-coverage). The domain concept is a general concept. Meaning that the range is uses it often much broader than the actual range of data used by the object. A value domain may be valid for {-1e300 ,0-1e300} while in the coverage the actual range is 0-10. This difference is captured by the datadefinition.
| DataDefinition::DataDefinition | ( | const DataDefinition & | def | ) |
Copy constructor
copies the values of the given DataDefinition to a new one, will also copy 0 and NULL values
| def | DataDefinition to be copied onto the new one |
| DataDefinition::DataDefinition | ( | const IDomain & | dm, |
| Ilwis::Range * | rng = 0 |
||
| ) |
Constructs a new DataDefinition based on an IDomain and a Range
sets the domain of the new DataDefinition as dm, and sets the range to rng, if rng != 0
if rng = 0 (defaultvalue) it will set the domain->range2range() as range (the range will be equal to the domain)
if rng != 0, it must be a valid range, which will than be set as the range of this DataDefinition
| dm | The Domain of the new DataDefinition |
| rng | The range of the new DataDefinition |
| DataDefinition::DataDefinition | ( | ) |
Constructor for an empty DataDefinition
| IDomain DataDefinition::domain | ( | ) | const |
Query for the domain of this DataDefinition
can return invalid domains
| void DataDefinition::domain | ( | const IDomain & | dom | ) |
Sets a new domain to this DataDefinition
Also sets the range of this domain as the new range of this DataDefinition if the domain can be converted to a range
will not do anything to the range if the given domain is invalid
| dom | The new Domain |
| bool DataDefinition::isCompatibleWith | ( | const DataDefinition & | def | ) | const |
Checks if this DataDefinition is compatible with some other DataDefinition
They are Compatible when they are both valid and their IDomain's are compatible
def cannot be null
| def | the other DataDefinition |
| bool DataDefinition::isValid | ( | ) | const |
Checks if this Datadefinition is valid
A DataDefinition is valid when its Domain is valid
|
static |
Merges 2 DataDefinitions into 1 new DataDefinition
if 1 is not valid and the other is, the valid definition will be returned
def 1 and def 2 cannot be null
| def1 | The first definition to be merged |
| def2 | The second definition to be merged |
| DataDefinition & DataDefinition::operator= | ( | const DataDefinition & | def1 | ) |
Assigns the values of the other DataDefinition to this
(copy constructor)
| def1 | the other DataDefinition |
| void DataDefinition::range | ( | Ilwis::Range * | vr | ) |
Changes the range of this DataDefinition to the one specified
the new range must be valid on the domain of this DataDefinition
| vr | The new Range |
1.8.3.1