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 Member Functions | Friends | List of all members
Ilwis::FeatureCoverage Class Reference

#include <featurecoverage.h>

Inheritance diagram for Ilwis::FeatureCoverage:
Ilwis::Coverage Ilwis::IlwisObject Ilwis::Identity

Public Member Functions

 FeatureCoverage ()
 
 FeatureCoverage (const Resource &resource)
 
IlwisTypes featureTypes () const
 
void featureTypes (IlwisTypes types)
 
UPFeatureInewFeature (geos::geom::Geometry *geom, bool load=true)
 
UPFeatureInewFeature (const QString &wkt, bool load=true)
 
UPFeatureInewFeatureFrom (const Ilwis::UPFeatureI &existingFeature, const Ilwis::ICoordinateSystem &csySource=ICoordinateSystem())
 
quint32 featureCount (IlwisTypes types=itFEATURE, bool subAsDistinct=false, int index=iUNDEF) const
 
void setFeatureCount (IlwisTypes types, quint32 geomCnt, quint32 multicnt, int index=0)
 
quint32 maxIndex () const
 
IlwisTypes ilwisType () const
 
FeatureCoverageclone ()
 
const UPGeomFactory & geomfactory () const
 
bool prepare ()
 
- Public Member Functions inherited from Ilwis::Coverage
 Coverage ()
 
 Coverage (const Resource &source)
 
ICoordinateSystem coordinateSystem () const
 
void coordinateSystem (const ICoordinateSystem &csy)
 
Envelope envelope () const
 
void envelope (const Envelope &bnds)
 
AttributeTable attributeTable (AttributeType attType=atCOVERAGE) const
 
AttributeTableattributeTable (AttributeType attType=atCOVERAGE)
 
bool hasAttributes (AttributeType attType=atCOVERAGE) const
 
void attributeTable (const ITable &tbl, AttributeType attType=atCOVERAGE)
 Sets a new Coveragetable or Indextable. More...
 
NumericStatisticsstatistics ()
 
const DataDefinitiondatadefIndex () const
 
DataDefinitiondatadefIndex ()
 
QVariant value (const QString &colName, quint32 itemid, qint32 layerIndex=-1)
 Returns a value in the Coverage- or Index-table. More...
 
Resource source (int mode=cmINPUT) const
 source the location of the source that represents the physical read origin of this object More...
 
double layerIndex (const QString &value)
 
void setLayerIndexes (const ItemRange &items)
 
void setName (const QString &nam)
 
- Public Member Functions inherited from Ilwis::IlwisObject
 IlwisObject ()
 
 IlwisObject (const Resource &source)
 
void setName (const QString &nm)
 
void setCode (const QString &cd)
 
QDateTime modifiedTime () const
 returns the moment when the object was last modified More...
 
void setModifiedTime (const Time &time)
 sets the last modified time of the object More...
 
Time createTime () const
 
void setCreateTime (const Time &time)
 
virtual QString toString ()
 translates the defintion of an object to a string representation More...
 
virtual void setConnector (ConnectorInterface *connector, int mode=cmINPUT|cmOUTPUT)
 connects an ilwisobject to an input or output source More...
 
virtual bool isEqual (const Ilwis::IlwisObject *obj) const
 isEqual compares the properties of ilwisobjects to test for equality. More...
 
virtual bool isValid () const
 isValid Tests the validity of an ilwisobject. More...
 
virtual bool isReadOnly () const
 isReadOnly tells if the source/target of the ilwisobject maybe modifiable. More...
 
virtual void setReadOnly (bool yesno)
 
virtual bool hasChanged () const
 
virtual void changed (bool yesno)
 
virtual bool prepare (const QString &def)
 prepare More...
 
bool fromInternal (const QSqlRecord &rec)
 
bool isAnonymous () const
 
virtual bool store (int mode=smMETADATA|smBINARYDATA)
 target the location of the source that represents the physical write target of this object More...
 
void connectTo (const QUrl &url, const QString &format, const QString &fnamespace, ConnectorMode cmode)
 
virtual bool merge (const IlwisObject *obj, int options=0)
 
bool isSystemObject () const
 
bool isInternalObject () const
 
- Public Member Functions inherited from Ilwis::Identity
QString code () const
 code returns the code of the identity. If no code is attached it will return sUNDEF ("?"). More...
 
quint64 id () const
 id returns a unsigned 64-bit number unique for the objects using the identity More...
 
virtual QString name () const
 name returns the name of an object. All objects have names though names need not to be unique More...
 
void setName (const QString &n)
 setName sets the name of an object. All objects have names though names need not to be unique More...
 
virtual QString description () const
 
void setDescription (const QString &desc)
 

Static Public Member Functions

static IlwisTypes geometryType (const geos::geom::Geometry *geom)
 

Protected Member Functions

void copyTo (IlwisObject *obj)
 
- Protected Member Functions inherited from Ilwis::Coverage
void copyTo (IlwisObject *obj)
 
- Protected Member Functions inherited from Ilwis::IlwisObject
QScopedPointer
< ConnectorInterface > & 
connector (int mode=cmINPUT|cmOUTPUT)
 
const QScopedPointer
< ConnectorInterface > & 
connector (int mode=cmINPUT|cmOUTPUT) const
 
bool setValid (bool yesno)
 
void copyTo (IlwisObject *obj)
 
- Protected Member Functions inherited from Ilwis::Identity
 Identity (const QString &name, qint64 id=i64UNDEF, const QString &cde=sUNDEF, const QString &descr=sUNDEF)
 
void prepare (quint64 base=0)
 
void setId (quint64 newid)
 

Friends

class FeatureIterator
 

Additional Inherited Members

- Public Types inherited from Ilwis::Coverage
enum  AttributeType { atCOVERAGE, atINDEX }
 
- Protected Attributes inherited from Ilwis::IlwisObject
std::mutex _mutex
 
std::mutex _loadforstore
 

Detailed Description

A feature in Ilwis-Objects is anything that can have one or more geometries and has one distinct identity. In the Ilwis-Objects terminology an ice berg tracked over time (assuming it doesn’t split) can be represented as one feature. It may change shape and/or location in time but it is still the same ice berg. The track of geometries is referred to as the ‘index ‘, similar to the same notion in the raster data model. A feature at a certain index is referred to as feature-element and is similar to a traditional elements of vector maps. Apart from geometries, features also have extensible set of other properties (the attributes) that depend on the nature of the feature and context in which it is used. Organization On a programmatic level sets of features are organized in a feature coverage. Feature coverages are collections of features that share one or more properties (e.g. within the same bounding box).

Features are thus described by

The consequence is that feature-coverages are described by

Indexes are mapped onto a domain. A few notes here:

  1. The traditional feature layer representation is of course still possible. It is just a feature set with only one index and one geometry type.
  2. A feature set is not necessarily mono-type, not even when they are restricted to one index. Features happily coexist with different geometries. This doesn’t prevent mono-type sets though.
  3. As with rasters, movement through the feature set is controlled by an iterator. This iterator can (optionally) discriminate between the various geometry types(and other properties). Every feature is tied to a record in an attribute table through its featureid. A featureid is a run-time unique id that is generated for every feature during the run time existence of this instance of Ilwis- Objects. No meaning or persistence is attached to the featureid. It is only a glue between feature-set and attribute table.

The index may have an attribute table were attributes are stored that are solely dependent on the featureid + index key combination.

See Also
FeatureIterator

Constructor & Destructor Documentation

FeatureCoverage::FeatureCoverage ( )

Constructor for an empty FeatureCoverage

FeatureCoverage::FeatureCoverage ( const Resource resource)

Constructs a FeatureCoverage from a Resource

See Also
Resource
Parameters
resourcethe resource to be used

Member Function Documentation

FeatureCoverage * FeatureCoverage::clone ( )
virtual

Copies all fields onto a new FeatureCoverage

Returns
a New FeatureCoverage with the same values as this

Reimplemented from Ilwis::IlwisObject.

quint32 FeatureCoverage::featureCount ( IlwisTypes  types = itFEATURE,
bool  subAsDistinct = false,
int  index = iUNDEF 
) const

Counts the amount of features of a given type in this FeatureCoverage, if you use the default value all features will be counted. the index is used the specify where in the third dimension of this coverage we should count, you only need to specify this if this coverage actually has a third dimension.

Parameters
typesthe type of feature that should be counted
indexspecification of the third dimension, when required
Returns
the amount of features of this type
void FeatureCoverage::featureTypes ( IlwisTypes  types)

Set method for the featureTypes, changes the feature type field to the given value

Parameters
typesthe new feature type
IlwisTypes FeatureCoverage::ilwisType ( ) const
virtual

Gives the IlwisTypes of this object

See Also
IlwisObject
Returns
the IlwisTypes of this IlwisObject

Implements Ilwis::IlwisObject.

UPFeatureI & FeatureCoverage::newFeature ( geos::geom::Geometry *  geom,
bool  load = true 
)

Creates a new UPFeatureI from the given geometry you could say the geometry gets transformed into a feature

See Also
UPFeatureI
Geometry
Parameters
geomthe geometry that has to be used for the new feature
loadthe load parameter forces the coverage to load the features if they are not already loaded. There are cases were this behavior is not needed, e.g. when actually loading the features(uses this method)
Returns
returns the new feature, can be a nullptr if the geometry was invalid
UPFeatureI & FeatureCoverage::newFeatureFrom ( const Ilwis::UPFeatureI existingFeature,
const Ilwis::ICoordinateSystem csySource = ICoordinateSystem() 
)

Creates a new Feature from an existing Feature and a coordinatesystem if no coordinate system specified the coordinate system of this coverage will be used

A new feature will always get a attribute record upon creation

you could say this generates a copy of the existing feature with a new id and such

See Also
UPFeatureI
ICoordinateSystem
Parameters
existingFeaturethe Feature that should be used as a template for the new one
csySourcethe coordinate system that should be used must of course be compatible with the given Feature
Returns
A new feature or a nullptr if the given Feature was invalid
bool FeatureCoverage::prepare ( )
virtual

tries to Prepares this ilwisobject for use

Returns
true when the prepare succeeded

Reimplemented from Ilwis::Coverage.

void FeatureCoverage::setFeatureCount ( IlwisTypes  types,
quint32  geomCnt,
quint32  multicnt,
int  index = 0 
)

Changes the amount of features for a certain featuretype note if you use this function multiple times with different types, it will change the count of every type that has been changed before so: setFeatureCount(type1,3); setFeatureCount(type2,4); sets the amount of both type 1 and type 2 to 4

Parameters
typesthe type that should be set
cntthe count that should be set

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