Ilwis-Objects  1.0
GIS and Remote Sensing framework for data access and processing
 All Classes Functions Enumerations Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Ilwis::DataDefinition Class Reference

#include <datadefinition.h>

Public Member Functions

 DataDefinition (const DataDefinition &def)
 
 DataDefinition (const IDomain &dm, Ilwis::Range *rng=0)
 
 DataDefinition ()
 
DataDefinitionoperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

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

Parameters
defDataDefinition 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

See Also
Domain
Parameters
dmThe Domain of the new DataDefinition
rngThe range of the new DataDefinition
DataDefinition::DataDefinition ( )

Constructor for an empty DataDefinition

Member Function Documentation

IDomain DataDefinition::domain ( ) const

Query for the domain of this DataDefinition
can return invalid domains

Returns
The IDomain of this DataDefinition
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

Parameters
domThe 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

See Also
Domain
Parameters
defthe other DataDefinition
Returns
true when compatible
bool DataDefinition::isValid ( ) const

Checks if this Datadefinition is valid
A DataDefinition is valid when its Domain is valid

See Also
Domain
Returns
true when valid
DataDefinition DataDefinition::merge ( const DataDefinition def1,
const DataDefinition def2 
)
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

Parameters
def1The first definition to be merged
def2The second definition to be merged
Returns
The merged DataDefinition, one of the 2 starters (if 1 was invalid) OR an empty definition if both were invalid
DataDefinition & DataDefinition::operator= ( const DataDefinition def1)

Assigns the values of the other DataDefinition to this
(copy constructor)

Parameters
def1the other DataDefinition
Returns
a copy of 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

Parameters
vrThe new Range

The documentation for this class was generated from the following files: