Skip To Content ArcGIS for Developers Sign In Dashboard

Feature Class

(Esri::ArcGISRuntime::Feature)

Base class for a single feature from a FeatureTable. More...

Header: #include <Feature>
Since: Esri::ArcGISRuntime 100.0
Inherits: Object and GeoElement
Inherited By:

Esri::ArcGISRuntime::ArcGISFeature

Public Functions

~Feature()
FeatureObjectType featureObjectType() const
FeatureTable *featureTable() const
bool refresh()

Reimplemented Public Functions

virtual AttributeListModel *attributes() const
virtual Geometry geometry() const
virtual void setGeometry(const Geometry &geometry)

Signals

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

Base class for a single feature from a FeatureTable.

A feature is a representation of a real-world object, such as a polygon to that represents a land parcel or a point that represents a location. All features have a fixed schema, which may contain:

  • A list model of attributes of the real-world entity it represents.
  • A geometry which describes the location and the shape of the entity.

Classes that inherit from Feature have additional capabilities to support their specific uses.

Member Function Documentation

Feature::~Feature()

Destructor.

[virtual] AttributeListModel *Feature::attributes() const

Reimplemented from GeoElement::attributes().

Returns a list model of all the feature attributes as key-value pairs.

FeatureObjectType Feature::featureObjectType() const

Returns the type of feature.

FeatureTable *Feature::featureTable() const

Returns a reference to the FeatureTable that this feature came from.

[virtual] Geometry Feature::geometry() const

Reimplemented from GeoElement::geometry().

Returns the geometry for this feature.

See also setGeometry().

[signal] void Feature::geometryChanged()

Signal emitted when the geometry is changed.

This function was introduced in Esri::ArcGISRuntime 100.2.1.

See also GeoElement.

bool Feature::refresh()

Resets the attributes and geometry to the values in the data source, returning true on success or false otherwise.

Discards any in-memory changes to the Feature that have not been applied to the table, and reloads the Feature geometry and all attributes.

This function was introduced in Esri::ArcGISRuntime 100.4.

[virtual] void Feature::setGeometry(const Geometry &geometry)

Reimplemented from GeoElement::setGeometry().

Sets the geometry for the feature.

See also geometry().


Feedback on this topic?