Etiqueta de polígono de TIN (3D Analyst)
Resumen
Crea entidades de polígono utilizando valores de etiqueta en un dataset de red irregular de triángulos (TIN).
Ilustración
![]() |
Uso
Los valores de etiqueta se puede asignar con un campo de enteros en una clase de entidad de polígono al cargar el polígono dentro del TIN como un tipo de superficie de relleno de valor. Para obtener más información sobre los tipos de superficie, lea Principios básico de la edición de superficies de TIN.
A los triángulos que no tienen una etiqueta asignada explícitamente se les asignan el valor predeterminado de 0.
-
Todos los triángulos contiguos con un valor de etiqueta idéntica se almacenarán en una entidad de polígono única.
-
El valor de etiqueta se denotará como un atributo en la clase de entidad de salida.
Sintaxis
| Parámetro | Explicación | Tipo de datos |
in_tin |
The input TIN. | TIN Layer |
out_feature_class |
The output feature class. | Feature Class |
tag_field (Opcional) |
El nombre del campo que almacena el atributo de etiqueta en la clase de entidad de salida. El nombre de campo predeterminado es Tag_Value. | String |
Ejemplo de código
The following sample demonstrates the use of this tool in the Python window:
import arcpy
from arcpy import env
arcpy.CheckOutExtension("3D")
env.workspace = "C:/data"
arcpy.TinPolygonTag_3d("tin", "tin_polytag.shp", "Tag_Value")
The following sample demonstrates the use of this tool in a stand-alone Python script:
'''****************************************************************************
Name: TinPolygonTag Example
Description: This script demonstrates use of the
TinPolygonTag tool to extract tag information
from each TIN in the target workspace.
****************************************************************************'''
# Import system modules
import arcpy
from arcpy import env
import exceptions, sys, traceback
try:
arcpy.CheckOutExtension("3D")
# Set environment settings
env.workspace = "C:/data"
# Set Local Variables
TagField = "Code"
# Create list of TINs
TINList = arcpy.ListDatasets("*", "Tin")
# Verify the presence of TINs in the list
if TINList:
# Iterate through the list of TINs
for dataset in TINList:
# Define the name of the output file
Output = dataset + "_domain.shp"
# Execute TinPolygonTag
arcpy.TinPolygonTag_3d(dataset, Output, TagFieldField)
print "Finished."
else:
print "No TIN files reside in {0}".format(env.workspace)
arcpy.CheckInExtension("3D")
except arcpy.ExecuteError:
print arcpy.GetMessages()
except:
# Get the traceback object
tb = sys.exc_info()[2]
tbinfo = traceback.format_tb(tb)[0]
# Concatenate error information into message string
pymsg = 'PYTHON ERRORS:\nTraceback info:\n{0}\nError Info:\n{1}'\
.format(tbinfo, str(sys.exc_info()[1]))
msgs = 'ArcPy ERRORS:\n {0}\n'.format(arcpy.GetMessages(2))
# Return python error messages for script tool or Python Window
arcpy.AddError(pymsg)
arcpy.AddError(msgs)
