Ilwis-Objects
1.0
GIS and Remote Sensing framework for data access and processing
|
#include <featurecoverage.h>
Public Member Functions | |
FeatureCoverage () | |
FeatureCoverage (const Resource &resource) | |
IlwisTypes | featureTypes () const |
void | featureTypes (IlwisTypes types) |
UPFeatureI & | newFeature (geos::geom::Geometry *geom, bool load=true) |
UPFeatureI & | newFeature (const QString &wkt, bool load=true) |
UPFeatureI & | newFeatureFrom (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 |
FeatureCoverage * | clone () |
const UPGeomFactory & | geomfactory () const |
bool | prepare () |
![]() | |
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 |
AttributeTable & | attributeTable (AttributeType attType=atCOVERAGE) |
bool | hasAttributes (AttributeType attType=atCOVERAGE) const |
void | attributeTable (const ITable &tbl, AttributeType attType=atCOVERAGE) |
Sets a new Coveragetable or Indextable. More... | |
NumericStatistics & | statistics () |
const DataDefinition & | datadefIndex () const |
DataDefinition & | datadefIndex () |
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) |
![]() | |
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 |
![]() | |
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) |
![]() | |
void | copyTo (IlwisObject *obj) |
![]() | |
QScopedPointer < ConnectorInterface > & | connector (int mode=cmINPUT|cmOUTPUT) |
const QScopedPointer < ConnectorInterface > & | connector (int mode=cmINPUT|cmOUTPUT) const |
bool | setValid (bool yesno) |
void | copyTo (IlwisObject *obj) |
![]() | |
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 | |
![]() | |
enum | AttributeType { atCOVERAGE, atINDEX } |
![]() | |
std::mutex | _mutex |
std::mutex | _loadforstore |
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:
The index may have an attribute table were attributes are stored that are solely dependent on the featureid + index key combination.
FeatureCoverage::FeatureCoverage | ( | ) |
Constructor for an empty FeatureCoverage
FeatureCoverage::FeatureCoverage | ( | const Resource & | resource | ) |
Constructs a FeatureCoverage from a Resource
resource | the resource to be used |
|
virtual |
Copies all fields onto a new FeatureCoverage
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.
types | the type of feature that should be counted |
index | specification of the third dimension, when required |
void FeatureCoverage::featureTypes | ( | IlwisTypes | types | ) |
Set method for the featureTypes, changes the feature type field to the given value
types | the new feature type |
|
virtual |
Gives the IlwisTypes of this object
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
geom | the geometry that has to be used for the new feature |
load | the 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) |
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
existingFeature | the Feature that should be used as a template for the new one |
csySource | the coordinate system that should be used must of course be compatible with the given Feature |
|
virtual |
tries to Prepares this ilwisobject for use
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
types | the type that should be set |
cnt | the count that should be set |