ArcObjects Library Reference (GeoDatabase)  

ITinEdit.AddFromFeatureClass Method

Adds features from a feature class to the TIN.

[Visual Basic .NET]
Public Sub AddFromFeatureClass ( _
    ByVal pFeatureClass As IFeatureClass, _
    ByVal pFilter As IQueryFilter, _
    ByVal pHeightField As IField, _
    ByVal pTagValueField As IField, _
    ByVal Type As esriTinSurfaceType, _
    [ByRef pbUseShapeZ As Object] _
)
[C#]
public void AddFromFeatureClass (
    IFeatureClass pFeatureClass,
    IQueryFilter pFilter,
    IField pHeightField,
    IField pTagValueField,
    esriTinSurfaceType Type,
    ref object pbUseShapeZ
);
[C#]

Optional Values

pbUseShapeZ   To indicate that this parameter is undefined, first define a variable object Missing = Type.Missing; then pass this in as ref Missing.
[C++]
HRESULT AddFromFeatureClass(
  IFeatureClass* pFeatureClass,
  IQueryFilter* pFilter,
  IField* pHeightField,
  IField* pTagValueField,
  esriTinSurfaceType Type,
  VARIANT* pbUseShapeZ
);
[C++]

Parameters

pFeatureClass [in]

  pFeatureClass is a parameter of type IFeatureClass

pFilter [in]

  pFilter is a parameter of type IQueryFilter

pHeightField [in]

  pHeightField is a parameter of type IField

pTagValueField [in]

  pTagValueField is a parameter of type IField

Type [in]

  Type is a parameter of type esriTinSurfaceType

pbUseShapeZ [optional]   pbUseShapeZ is a parameter of type VARIANT

  To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Adds shapes from the input featureclass into the triangulation.

FeatureClass provides the input geometry to be added to the TIN.

Filter is a QueryFilter that may be used to select a subset of features. This can be set to NULL ('Nothing' in VB) if all the shapes in the featureclass are to be used.

HeightField is a Field that indicates where the heights for the shapes come from. If the shape geometry is 3D, and that's what you want to use, pass the Shape field of the featureclass. Otherwise, a numeric field can be used. If the heights for the features should be interpolated from the existing state of the TIN, assuming some features with heights had been previously added, you can pass a NULL pointer ('Nothing' in VB) to indicate the features do not have Z values of their own.

TagValueField is a numeric field used to assign tags to corresponding elements in the TIN. Tag values are signed long integers that are assigned to nodes, edges, or triangles. They have user defined meaning (e.g. node accuracy, land cover, etc.). Node and triangle tags are saved to disk with the TIN. At present, edge tags are only stored in memory and are lost when the TIN is saved. If no tag values are to be used pass a NULL pointer ('Nothing' in VB).

Type is an esriTinSurfaceType. This indicates how the input feature geometry is incorporated into the triangulation.

UseShapeZ is a boolean used to indicate whether geometry Z's or M's should be used in the case the input geometry has both and the height field is set the the shape field. The default is TRUE, the Z's will be used rather than the M's. Set this to FALSE if the M's should be used for height.

 

Notes:

If records containing NULL shapes or numeric fields with NULL Z values are encountered the triangulation process will skip them and continue. If this happens AddFromFeatureClass will raise the error E_TIN_NULL_FIELD_VALUE when it's finished. Therefore, all valid data in the feature class gets triangulated but a note is made, in the form of a specific error, to let the caller know one or more records were skipped. The caller then has the choice of using the resulting TIN or not.

See Also

ITinEdit Interface