Provides access to members that control TIN editing.
Description
The ITinEdit interface is the primary interface for creating and modifying TINs. Most other interfaces grant read access to TIN elements but modifications need to come through here or ITinFeatureEdit.
Members
Name | Description | |
---|---|---|
AddFromFeatureClass | Adds features from a feature class to the TIN. | |
AddFromFeatureCursor | Adds features from a feature cursor to the TIN. | |
AddFromPixelBlock | Adds pixels from a pixel block to the TIN. | |
AddPointZ | Adds a 3D point to the TIN. | |
AddShape | Adds a 2D shape to the TIN. | |
AddShapeZ | Adds a 3D shape to the TIN. | |
AddWKSPointZ | Adds a well known structure point to the TIN. | |
DeleteEdgeTagValues | Deletes all edge tag values in the TIN. | |
DeleteNode | Deletes a specified node from the TIN. | |
DeleteNodesOutsideDataArea | Deletes all nodes from outside the TIN interpolation zone. | |
DeleteNodeTagValues | Deletes all node tag values in the TIN. | |
DeleteSelectedNodes | Deletes specified nodes from the TIN. | |
DeleteTriangleTagValues | Deletes all triangle face tag values in the TIN. | |
InitNew | Initializes a new TIN using the passed extent to define the data area. | |
IsDirty | Indicates if the TIN is dirty. | |
IsEditable | Indicates if the TIN can be edited. | |
IsInEditMode | Indicates if the TIN is in edit mode. | |
PropagateTriangleTagValue | Propagates triangle tag value changes to all immediate triangles with the same initial value. | |
Refresh | Updates TIN's extents, data area, and data elements count. | |
Save | Saves edits to disk. | |
SaveAs | Saves the TIN to disk using the specified name. | |
SetEdgeTagValue | Sets the tag value of the triangle edge referenced by the index. | |
SetEdgeType | Sets the type of the triangle edge referenced by the TIN. | |
SetNodeTagValue | Sets the tag value of a TIN node referenced by the index. | |
SetNodeZ | Sets the z value of a TIN node referenced by the index. | |
SetSpatialReference | Set a copy of the specified spatial reference to the TIN. | |
SetTriangleInsideDataArea | Sets a triangle within the TIN interpolation zone. | |
SetTriangleOutsideDataArea | Sets a triangle outside of the TIN interpolation zone. | |
SetTrianglesInsideDataArea | Sets all triangles within the TIN interpolation zone. | |
SetTriangleTagValue | Sets the face tag value of the triangle referenced by the index. | |
StartEditing | Initiates edit mode. | |
StopEditing | Terminates edit mode, optionally saving changes to disk. |
ITinEdit.AddFromFeatureClass Method
Adds features from a feature class to the TIN.
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] _
)
public void AddFromFeatureClass (
IFeatureClass pFeatureClass,
IQueryFilter pFilter,
IField pHeightField,
IField pTagValueField,
esriTinSurfaceType Type,
ref object pbUseShapeZ
);
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.
ITinEdit.AddFromFeatureCursor Method
Adds features from a feature cursor to the TIN.
Public Sub AddFromFeatureCursor ( _
ByVal pCursor As IFeatureCursor, _
ByVal pHeightField As IField, _
ByVal pTagValueField As IField, _
ByVal Type As esriTinSurfaceType, _
[ByRef pbUseShapeZ As Object] _
)
public void AddFromFeatureCursor (
IFeatureCursor pCursor,
IField pHeightField,
IField pTagValueField,
esriTinSurfaceType Type,
ref object pbUseShapeZ
);
ITinEdit.AddFromPixelBlock Method
Adds pixels from a pixel block to the TIN.
Public Sub AddFromPixelBlock ( _
ByVal xOrigin As Double, _
ByVal yOrigin As Double, _
ByVal xPixelSize As Double, _
ByVal yPixelSize As Double, _
ByVal valueForNoData As Object, _
ByVal block As Object, _
ByVal ZTolerance As Double, _
[ByRef pMaxPoints As Object], _
[ByRef pbToleranceAchieved As Object] _
)
public void AddFromPixelBlock (
double xOrigin,
double yOrigin,
double xPixelSize,
double yPixelSize,
object valueForNoData,
object block,
double ZTolerance,
ref object pMaxPoints,
ref object pbToleranceAchieved
);
Description
This function is used in raster to TIN conversion. It's a recursive process that adds pixel cell centers from the PixelBlock as nodes to the TIN. The process stops once a specified vertical accuracy has been achieved, or a maximum number of nodes have been added.
xOrigin and _yOrigin_represent the upper left cell center of the PixelBlock in map space coordinates.
xPixelSize and yPixelSize represent the x and y cell dimensions (cellsize) of the PixelBlock.
valueForNoData is the value used for cells in the PixelBlock to indicate NoData. Cells with this value will be excluded.
block is the PixelBlock itself.
zTolerance is a vertical accuracy parameter. The resulting TIN's height field will not differ from the input PixelBlock's by more than this value. A smaller zTolerance produces a TIN that is more accurate.
[MaxPoints] is an optional long integer. The process will halt if the total number of nodes in the TIN, not just just those added by this function, has been reached without the zTolerance being achieved. For performance reasons [MaxPoints] is approximate so it's possible the resulting TIN may be slightly larger than the value specified.
[bToleranceAchieved] is a boolean that is set by the function if the [MaxPoints] argument was specified. It is set to TRUE if the zTolerance was met or FALSE if the function had to quit as a result of reaching [MaxPoints] without meeting the tolerance.
ITinEdit.AddPointZ Method
Adds a 3D point to the TIN.
Public Function AddPointZ ( _
ByVal pPoint As IPoint, _
ByVal TagValue As Integer _
) As Integer
public int AddPointZ (
IPoint pPoint,
int TagValue
);
Description
Use 0 for the tag value if you're not interested in it.
The index returned will be one larger than the previous node countif the point is succesfully added. It will be equal to the value of an existing node if snapped to it.
This function should not be called if the geometry IsEmpty.
ITinEdit.AddShape Method
Adds a 2D shape to the TIN.
Public Sub AddShape ( _
ByVal pShape As IGeometry, _
ByVal Type As esriTinSurfaceType, _
ByVal TagValue As Integer, _
[ByRef pZ As Object] _
)
public void AddShape (
IGeometry pShape,
esriTinSurfaceType Type,
int TagValue,
ref object pZ
);
Description
Adds a 2D point, multipoint, polyline, or polygon to the TIN.
The esriTinSurfaceType enumeration indicates how the input geometry is to be incorporated into the TIN. The surface types which are valid depend on the type of geometry being entered. Points can only be entered as mass points. Polylines can be entered as hard or soft breakline types or have their vertices entered as mass points. Polygons can be entered as polygon, line, or mass surface types.
Tags are assigned using the _TagValue_argument. If the surface feature type is set to mass points the tag is assigned to the resulting TIN nodes. If the surface type is polygonal the tags are assigned to triangles. A value of 0 will result in no tag assignment.
Z values for the shape's vertices are interpolated from the existing state of the TIN before the shape is inserted. The assumption is the existing TIN already has data with Z's. Typically 2D shapes are added to a TIN after all available 3D shapes.
You can use the optional Z argument to provide a constant height for the shape. In this case no interpolation for the shape takes place.
This function should not be called if the geometry IsEmpty.
ITinEdit.AddShapeZ Method
Adds a 3D shape to the TIN.
Public Sub AddShapeZ ( _
ByVal pShape As IGeometry, _
ByVal Type As esriTinSurfaceType, _
ByVal TagValue As Integer, _
[ByRef pbUseShapeZ As Object] _
)
public void AddShapeZ (
IGeometry pShape,
esriTinSurfaceType Type,
int TagValue,
ref object pbUseShapeZ
);
Description
The input geometry, pShape, needs to have Z values defined for all vertices.
The input shape geometry can be point, multipoint, polyline, or polygon.
The esriTinSurfaceType enumeration indicates how the input geometry is to be incorporated into the TIN. The surface types which are valid depend on the type of geometry being entered. Points can only be entered as mass points. Polylines can be entered as hard or soft breakline types or have their vertices entered as mass points. Polygons can be entered as polygon, line, or mass surface types.
Tags are assigned using the _TagValue_argument. If the surface feature type is set to mass points the tag is assigned to the resulting TIN nodes. If the surface type is polygonal the tags are assigned to triangles. A value of 0 will result in no tag assignment.
Vertex M values can be substituted for Z's through use of the optional UseShapeZ argument. Its default value is True, causing Z's to be used. If M's are desired set it to False.
This function should not be called if the geometry IsEmpty.
ITinEdit.AddWKSPointZ Method
Adds a well known structure point to the TIN.
Public Function AddWKSPointZ ( _
ByRef pPoint As WKSPointZ, _
ByVal vlue As Integer _
) As Integer
public int AddWKSPointZ (
ref WKSPointZ pPoint,
ref int vlue
);
ITinEdit.DeleteEdgeTagValues Method
Deletes all edge tag values in the TIN.
Public Sub DeleteEdgeTagValues ( _
)
public void DeleteEdgeTagValues (
);
ITinEdit.DeleteNode Method
Deletes a specified node from the TIN.
Public Sub DeleteNode ( _
ByVal Index As Integer _
)
public void DeleteNode (
int Index
);
ITinEdit.DeleteNodesOutsideDataArea Method
Deletes all nodes from outside the TIN interpolation zone.
Public Sub DeleteNodesOutsideDataArea ( _
)
public void DeleteNodesOutsideDataArea (
);
ITinEdit.DeleteNodeTagValues Method
Deletes all node tag values in the TIN.
Public Sub DeleteNodeTagValues ( _
)
public void DeleteNodeTagValues (
);
ITinEdit.DeleteSelectedNodes Method
Deletes specified nodes from the TIN.
Public Sub DeleteSelectedNodes ( _
)
public void DeleteSelectedNodes (
);
ITinEdit.DeleteTriangleTagValues Method
Deletes all triangle face tag values in the TIN.
Public Sub DeleteTriangleTagValues ( _
)
public void DeleteTriangleTagValues (
);
ITinEdit.InitNew Method
Initializes a new TIN using the passed extent to define the data area.
Public Sub InitNew ( _
ByVal pExtent As IEnvelope _
)
public void InitNew (
IEnvelope pExtent
);
Description
The envelope, pExtent, defines the intended 2D domain of the TIN. Data subsequently added to the triangulation should fall within this extent. Four software synthesized nodes (called super nodes) will be used to form an initial triangulation. These will be positioned outside the declared extent. You should be fairly accurate with the extent so the positions of the super nodes is estimated correctly. Providing an unnecessarily large extent would result in the nodes being placed farther away than necessary from the data which can hurt performance and increase the likelihood of precision related issues.
If the envelope has a spatial reference it will be copied and assigned to the TIN. If there is a spatial reference it should have a Z domain/resolution defined. This is particularly true if you will be doing anything with the TIN other than simply adding features to it and saving to disk. Some operations on TIN use the geometry topology engine and these require a z domain when z-aware geometry is involved. Some spatial references are not supported by the prj file saved with a TIN for the sake of compatibility with workstation Arc/INFO. If a spatial reference is used that's not supported by workstation Arc/INFO a call to ITinEdit.SaveAs will exclude the prj file.
InitNew will automatically place the TIN in edit mode as there is an assumption that edits are about to take place.
ITinEdit.IsDirty Property
Indicates if the TIN is dirty.
Public ReadOnly Property IsDirty As Boolean
public bool IsDirty {get;}
Description
Returns True if TIN is in edit mode.
ITinEdit.IsEditable Property
Indicates if the TIN can be edited.
Public ReadOnly Property IsEditable As Boolean
public bool IsEditable {get;}
Description
This member indicates whether the TIN can be placed in edit mode. If it returns False it means the TIN is write protected and a call to ITinEdit.StartEditing will also return False because it will fail to place the TIN in edit mode.
Due to limitations with the Windows operating system and networks a TIN located across a network may appear to be writeable when it isn't. Because of this, IsEditable may incorrectly return True. If you attempt ITinEdit.StartEditing because of this it will detect the problem, as it tries to open the TIN for write access, and will return False.
ITinEdit.IsInEditMode Property
Indicates if the TIN is in edit mode.
Public ReadOnly Property IsInEditMode As Boolean
public bool IsInEditMode {get;}
ITinEdit.PropagateTriangleTagValue Method
Propagates triangle tag value changes to all immediate triangles with the same initial value.
Public Sub PropagateTriangleTagValue ( _
ByVal pSeed As ITinTriangle, _
ByVal newTagValue As Integer, _
ByVal bStopAtEnforcedEdge As Boolean _
)
public void PropagateTriangleTagValue (
ITinTriangle pSeed,
int newTagValue,
bool bStopAtEnforcedEdge
);
ITinEdit.Refresh Method
Updates TIN's extents, data area, and data elements count.
Public Sub Refresh ( _
)
public void Refresh (
);
Description
_Refresh_will update the data extent, the number of data elements (nodes, edges, triangles), and the interpolation zone of the TIN. For performance reasons these items are not updated with every edit operation. A call to _Refresh_will ensure the values are correct if you need them during an edit session.
A call to Save_will automatically make a call _Refresh.
ITinEdit.Save Method
Saves edits to disk.
Public Sub Save ( _
)
public void Save (
);
Description
Save will persist all edits back to the current TIN. If you want to preserve the original TIN, saving edits to a copy, use SaveAs.
ITinEdit.SaveAs Method
Saves the TIN to disk using the specified name.
Public Sub SaveAs ( _
ByVal newName As String, _
[ByRef pOverWrite As Object] _
)
public void SaveAs (
string newName,
ref object pOverWrite
);
Description
Saves the current state of the TIN to a new dataset on disk. The interface pointer will reference the saved TIN after the call is made.
The newName argument is a string representing the full path to the output TIN to be created.
The optional overwrite argument is used to replace (delete) a TIN if one already exists with the specified name. The default value is False.
ITinEdit.SetEdgeTagValue Method
Sets the tag value of the triangle edge referenced by the index.
Public Sub SetEdgeTagValue ( _
ByVal Index As Integer, _
ByVal Value As Integer _
)
public void SetEdgeTagValue (
int Index,
int Value
);
ITinEdit.SetEdgeType Method
Sets the type of the triangle edge referenced by the TIN.
Public Sub SetEdgeType ( _
ByVal Index As Integer, _
ByVal Type As esriTinEdgeType _
)
public void SetEdgeType (
int Index,
esriTinEdgeType Type
);
ITinEdit.SetNodeTagValue Method
Sets the tag value of a TIN node referenced by the index.
Public Sub SetNodeTagValue ( _
ByVal Index As Integer, _
ByVal Value As Integer _
)
public void SetNodeTagValue (
int Index,
int Value
);
ITinEdit.SetNodeZ Method
Sets the z value of a TIN node referenced by the index.
Public Sub SetNodeZ ( _
ByVal Index As Integer, _
ByVal Z As Double _
)
public void SetNodeZ (
int Index,
double Z
);
ITinEdit.SetSpatialReference Method
Set a copy of the specified spatial reference to the TIN.
Public Sub SetSpatialReference ( _
ByVal pSpatialReference As ISpatialReference _
)
public void SetSpatialReference (
ISpatialReference pSpatialReference
);
ITinEdit.SetTriangleInsideDataArea Method
Sets a triangle within the TIN interpolation zone.
Public Sub SetTriangleInsideDataArea ( _
ByVal Index As Integer _
)
public void SetTriangleInsideDataArea (
int Index
);
Description
This member will not work if attempted on a triangle comprised of a super node (one of the 4 outer nodes added by the software when the TIN is first created) as, by definition, they are considered outside the interpolation zone. An error will not be raised in this case though.
ITinEdit.SetTriangleOutsideDataArea Method
Sets a triangle outside of the TIN interpolation zone.
Public Sub SetTriangleOutsideDataArea ( _
ByVal Index As Integer _
)
public void SetTriangleOutsideDataArea (
int Index
);
ITinEdit.SetTrianglesInsideDataArea Method
Sets all triangles within the TIN interpolation zone.
Public Sub SetTrianglesInsideDataArea ( _
)
public void SetTrianglesInsideDataArea (
);
ITinEdit.SetTriangleTagValue Method
Sets the face tag value of the triangle referenced by the index.
Public Sub SetTriangleTagValue ( _
ByVal Index As Integer, _
ByVal Value As Integer _
)
public void SetTriangleTagValue (
int Index,
int Value
);
ITinEdit.StartEditing Method
Initiates edit mode.
Public Function StartEditing ( _
) As Boolean
public bool StartEditing (
);
Description
StartEditing places the TIN in edit mode. It must be called before any edits can take place. The exception is after using ITinEdit.InitNew which automatically places the TIN in edit mode.
A False value is returned if StartEditing is not successful at opening the TIN for write access. The likely cause for failure would be file permissions.
See also ITinFeatureEdit.StartInMemoryEditing
ITinEdit.StopEditing Method
Terminates edit mode, optionally saving changes to disk.
Public Function StopEditing ( _
ByVal bSaveEdits As Boolean _
) As Boolean
public bool StopEditing (
bool bSaveEdits
);
Description
StopEditing is used to take the TIN out of edit mode. The SaveEdits argument indicates whether edits should be committed to disk.
If SaveEdits is False the TIN will be returned to the state previous to this edit session. All edits will be undone.
If SaveEdits is True edits from this session will be committed to disk. The TIN must already exist on disk before using this option though. If the TIN is new and has yet to be saved to disk use ITinEdit.SaveAs first, then call StopEditing.
Classes that implement ITinEdit
Classes | Description |
---|---|
Tin | The Esri TIN component. |