|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITinEdit
Provides access to members that control TIN editing.
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.
Method Summary | |
---|---|
void |
addFromFeatureClass(IFeatureClass pFeatureClass,
IQueryFilter pFilter,
IField pHeightField,
IField pTagValueField,
int type,
Object pbUseShapeZ)
Adds features from a feature class to the TIN. |
void |
addFromFeatureCursor(IFeatureCursor pCursor,
IField pHeightField,
IField pTagValueField,
int type,
Object pbUseShapeZ)
Adds features from a feature cursor to the TIN. |
void |
addFromPixelBlock(double xOrigin,
double yOrigin,
double xPixelSize,
double yPixelSize,
Object valueForNoData,
Object block,
double zTolerance,
Object pMaxPoints,
Object[] pbToleranceAchieved)
Adds pixels from a pixel block to the TIN. |
int |
addPointZ(IPoint pPoint,
int tagValue)
Adds a 3D point to the TIN. |
void |
addShape(IGeometry pShape,
int type,
int tagValue,
Object pZ)
Adds a 2D shape to the TIN. |
void |
addShapeZ(IGeometry pShape,
int type,
int tagValue,
Object pbUseShapeZ)
Adds a 3D shape to the TIN. |
int |
addWKSPointZ(_WKSPointZ pPoint,
int vlue)
Adds a well known structure point to the TIN. |
void |
deleteEdgeTagValues()
Deletes all edge tag values in the TIN. |
void |
deleteNode(int index)
Deletes a specified node from the TIN. |
void |
deleteNodesOutsideDataArea()
Deletes all nodes from outside the TIN interpolation zone. |
void |
deleteNodeTagValues()
Deletes all node tag values in the TIN. |
void |
deleteSelectedNodes()
Deletes specified nodes from the TIN. |
void |
deleteTriangleTagValues()
Deletes all triangle face tag values in the TIN. |
void |
initNew(IEnvelope pExtent)
Initializes a new TIN using the passed extent to define the data area. |
boolean |
isDirty()
Indicates if the TIN is dirty. |
boolean |
isEditable()
Indicates if the TIN can be edited. |
boolean |
isInEditMode()
Indicates if the TIN is in edit mode. |
void |
propagateTriangleTagValue(ITinTriangle pSeed,
int newTagValue,
boolean bStopAtEnforcedEdge)
Propagates triangle tag value changes to all immediate triangles with the same initial value. |
void |
refresh()
Updates TIN's extents, data area, and data elements count. |
void |
save()
Saves edits to disk. |
void |
saveAs(String newName,
Object pOverWrite)
Saves the TIN to disk using the specified name. |
void |
setEdgeTagValue(int index,
int value)
Sets the tag value of the triangle edge referenced by the index. |
void |
setEdgeType(int index,
int type)
Sets the type of the triangle edge referenced by the TIN. |
void |
setNodeTagValue(int index,
int value)
Sets the tag value of a TIN node referenced by the index. |
void |
setNodeZ(int index,
double z)
Sets the z value of a TIN node referenced by the index. |
void |
setSpatialReference(ISpatialReference pSpatialReference)
Set a copy of the specified spatial reference to the TIN. |
void |
setTriangleInsideDataArea(int index)
Sets a triangle within the TIN interpolation zone. |
void |
setTriangleOutsideDataArea(int index)
Sets a triangle outside of the TIN interpolation zone. |
void |
setTrianglesInsideDataArea()
Sets all triangles within the TIN interpolation zone. |
void |
setTriangleTagValue(int index,
int value)
Sets the face tag value of the triangle referenced by the index. |
boolean |
startEditing()
Initiates edit mode. |
boolean |
stopEditing(boolean bSaveEdits)
Terminates edit mode, optionally saving changes to disk. |
Method Detail |
---|
boolean isEditable() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isInEditMode() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean isDirty() throws IOException, AutomationException
Returns True if TIN is in edit mode.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean startEditing() throws IOException, AutomationException
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
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean stopEditing(boolean bSaveEdits) throws IOException, AutomationException
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.
bSaveEdits
- The bSaveEdits (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void initNew(IEnvelope pExtent) throws IOException, AutomationException
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.
pExtent
- A reference to a com.esri.arcgis.geometry.IEnvelope (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void save() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void saveAs(String newName, Object pOverWrite) throws IOException, AutomationException
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.
newName
- The newName (in)pOverWrite
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int addWKSPointZ(_WKSPointZ pPoint, int vlue) throws IOException, AutomationException
pPoint
- A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (in)vlue
- The vlue (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int addPointZ(IPoint pPoint, int tagValue) throws IOException, AutomationException
Use 0 for the tag value if you're not interested in it.
The index returned will be one larger than the previous node count
if 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.
pPoint
- A reference to a com.esri.arcgis.geometry.IPoint (in)tagValue
- The tagValue (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addShapeZ(IGeometry pShape, int type, int tagValue, Object pbUseShapeZ) throws IOException, AutomationException
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.
pShape
- A reference to a com.esri.arcgis.geometry.IGeometry (in)type
- A com.esri.arcgis.geodatabase.esriTinSurfaceType constant (in)tagValue
- The tagValue (in)pbUseShapeZ
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addShape(IGeometry pShape, int type, int tagValue, Object pZ) throws IOException, AutomationException
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.
pShape
- A reference to a com.esri.arcgis.geometry.IGeometry (in)type
- A com.esri.arcgis.geodatabase.esriTinSurfaceType constant (in)tagValue
- The tagValue (in)pZ
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addFromFeatureClass(IFeatureClass pFeatureClass, IQueryFilter pFilter, IField pHeightField, IField pTagValueField, int type, Object pbUseShapeZ) throws IOException, AutomationException
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.
pFeatureClass
- A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)pFilter
- A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)pHeightField
- A reference to a com.esri.arcgis.geodatabase.IField (in)pTagValueField
- A reference to a com.esri.arcgis.geodatabase.IField (in)type
- A com.esri.arcgis.geodatabase.esriTinSurfaceType constant (in)pbUseShapeZ
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addFromFeatureCursor(IFeatureCursor pCursor, IField pHeightField, IField pTagValueField, int type, Object pbUseShapeZ) throws IOException, AutomationException
pCursor
- A reference to a com.esri.arcgis.geodatabase.IFeatureCursor (in)pHeightField
- A reference to a com.esri.arcgis.geodatabase.IField (in)pTagValueField
- A reference to a com.esri.arcgis.geodatabase.IField (in)type
- A com.esri.arcgis.geodatabase.esriTinSurfaceType constant (in)pbUseShapeZ
- A Variant (in, optional, pass null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void addFromPixelBlock(double xOrigin, double yOrigin, double xPixelSize, double yPixelSize, Object valueForNoData, Object block, double zTolerance, Object pMaxPoints, Object[] pbToleranceAchieved) throws IOException, AutomationException
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.
xOrigin
- The xOrigin (in)yOrigin
- The yOrigin (in)xPixelSize
- The xPixelSize (in)yPixelSize
- The yPixelSize (in)valueForNoData
- A Variant (in)block
- A Variant (in)zTolerance
- The zTolerance (in)pMaxPoints
- A Variant (in, optional, pass null if not required)pbToleranceAchieved
- A Variant (out: use single element array, optional, pass single element of null if not required)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteNode(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteSelectedNodes() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteNodesOutsideDataArea() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setEdgeType(int index, int type) throws IOException, AutomationException
index
- The index (in)type
- A com.esri.arcgis.geodatabase.esriTinEdgeType constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setNodeZ(int index, double z) throws IOException, AutomationException
index
- The index (in)z
- The z (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setNodeTagValue(int index, int value) throws IOException, AutomationException
index
- The index (in)value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setEdgeTagValue(int index, int value) throws IOException, AutomationException
index
- The index (in)value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setTriangleTagValue(int index, int value) throws IOException, AutomationException
index
- The index (in)value
- The value (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void propagateTriangleTagValue(ITinTriangle pSeed, int newTagValue, boolean bStopAtEnforcedEdge) throws IOException, AutomationException
pSeed
- A reference to a com.esri.arcgis.geodatabase.ITinTriangle (in)newTagValue
- The newTagValue (in)bStopAtEnforcedEdge
- The bStopAtEnforcedEdge (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setTrianglesInsideDataArea() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setTriangleInsideDataArea(int index) throws IOException, AutomationException
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.
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setTriangleOutsideDataArea(int index) throws IOException, AutomationException
index
- The index (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteNodeTagValues() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteEdgeTagValues() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void deleteTriangleTagValues() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void refresh() throws IOException, AutomationException
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.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setSpatialReference(ISpatialReference pSpatialReference) throws IOException, AutomationException
pSpatialReference
- A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |