3D-Linie mit Multipatch verschneiden (ArcGIS 3D Analyst)

Lizenzstufe:BasicStandardAdvanced

Zusammenfassung

Bestimmt die Anzahl der geometrischen Schnittpunkte zwischen Linien- und -Multipatch-Features und gibt sie zurück. Punkt-Features, die den Schnittpunkt darstellen, und Linien-Features, die die Eingabelinien darstellen, die an solchen Punkten geteilt sind, können optional in Ausgabe-Feature-Classes geschrieben werden.

Bild

Beispiel "3D-Linie mit Multipatch verschneiden"

Verwendung

Syntax

Intersect3DLineWithMultiPatch_3d (in_line_features, in_multipatch_features, {join_attributes}, {out_point_feature_class}, {out_line_feature_class})
ParameterErläuterungDatentyp
in_line_features

Die Linien-Features, die sich mit Multipatch-Features schneiden.

Feature Layer
in_multipatch_features

Die Multipatch-Features, mit denen sich die Linien schneiden.

Feature Layer
join_attributes
(optional)

Legt fest, ob die Attribute der Eingabe-Linien-Features in der Ausgabe-Line-Feature-Class beibehalten werden.

  • IDS_ONLY Keine Attribute der Eingabe-Linien-Features werden in die Ausgabe-Line-Feature-Class geschrieben. Dies ist die Standardeinstellung.
  • ALLAlle Attribute der Eingabe-Linien-Features werden in die Ausgabe-Line-Feature-Class geschrieben.
String
out_point_feature_class
(optional)

Optionale Features, die Schnittpunkte zwischen der 3D-Linie und Multipatch darstellen.

Feature Class
out_line_feature_class
(optional)

Optionale Features, die Eingabe-3D-Linien an den Schnittpunkten mit Multipatch-Features unterteilen.

Feature Class

Codebeispiel

Intersect3DLineWithMultipatch – Beispiel 1 (Python-Fenster)

Anhand des folgenden Beispiels wird die Verwendung dieses Werkzeugs im Python-Fenster veranschaulicht:

import arcpy
from arcpy import env

arcpy.CheckOutExtension('3D')
env.workspace = 'C:/data'
arcpy.Intersect3DLineWithMultiPatch_3d('inLine.shp', 'inMultipatch.shp', 
                                     'IDS_ONLY', 'outPts.shp', 'outLine.shp')
Intersect3DLineWithMultipatch – Beispiel 2 (eigenständiges Skript)

Im folgenden Beispiel wird die Verwendung dieses Werkzeugs in einem eigenständigen Python-Skript veranschaulicht:

'''****************************************************************************
Name: Intersect3DLineWithMultiPatch Example
Description: This script demonstrates how to
             use the Intersect3DLine tool.
****************************************************************************'''
# Import system modules
import arcpy
import exceptions, sys, traceback
from arcpy import env

try:
    # Obtain a license for the ArcGIS 3D Analyst extension
    arcpy.CheckOutExtension('3D')
    # Set environment settings
    env.workspace = 'C:/data'
    # Set Local Variables
    inLineFC = 'sample.gdb/lines_3d'
    inMP = 'sample.gdb/test_MP'
    # Ensure a unique name is produced for output files
    outPoint = arcpy.CreateUniqueName('OutPt_3DIntersect', 'sample.gdb')
    outLine = arcpy.CreateUniqueName('OutLine_3DIntersect', 'sample.gdb')
    
    # Execute Intersect 3D Line with Multipatch
    arcpy.Intersect3DLineWithMultiPatch_3d(inLineFC, inMP, 'IDS_ONLY', 
                                        outPoint, outLine)

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)

Umgebung

Verwandte Themen

Lizenzierungsinformationen

ArcGIS for Desktop Basic: Erfordert 3D Analyst
ArcGIS for Desktop Standard: Erfordert 3D Analyst
ArcGIS for Desktop Advanced: Erfordert 3D Analyst
9/11/2013