LAS Dataset To TIN (3D Analyst)

License Level:BasicStandardAdvanced

Summary

Exports a triangulated irregular network (TIN) from a LAS dataset.

Illustration

LAS Dataset to TIN

Usage

Syntax

LasDatasetToTin_3d (in_las_dataset, out_tin, {thinning_type}, {thinning_method}, {thinning_value}, {max_nodes}, {z_factor})
ParameterExplanationData Type
in_las_dataset

The input LAS dataset.

LAS Dataset Layer
out_tin

The output TIN dataset.

TIN
thinning_type
(Optional)

The type of thinning used for reducing the LAS data points saved as the nodes in the resulting TIN.

  • NONE—No thinning is applied, and no thinning method or thinning value is required. This is the default.
  • RANDOM—Randomly selects LAS data points based on the corresponding Thinning Method selection and Thinning Value entry.
  • WINDOW_SIZE—Reduces LAS data points by evaluating each square area defined by the Thinning Value and selecting LAS points using the Thinning Method.
String
thinning_method
(Optional)

The thinning method defines the specific technique used for reducing the LAS data points, and impacts the way the Thinning Value gets interpretted. The available options depend on the selected Thinning Type.

For RANDOM:

  • PERCENTThinning value will reflect a percentage of nodes in the full resolution of the LAS dataset.
  • NODE_COUNTThinning value will reflect the total number of nodes that are allowed in the output.

For WINDOW_SIZE:

  • MINIMUMSelects LAS data point with the lowest elevation in each of the automatically determined window size areas.
  • MAXIMUMSelects LAS data point with the highest elevation in each of the automatically determined window size areas.
  • CLOSEST_TO_MEANSelects LAS data point whose elevation is closest to the average value found in the automatically determined window size areas.
String
thinning_value
(Optional)

The value associated with the selected Thinning Type and Thinning Method.

For thinning methods available with the RANDOM point selection method:

  • PERCENT—value will represent percentage of data points from the full resolution of the LAS dataset.
  • NODE_COUNT—value will represent the total number of nodes allowed in the output TIN.

For any WINDOW_SIZE thinning methods, the value represents the area that the extent of the LAS dataset is divided into for sampling data points.

Double
max_nodes
(Optional)

The maximum number of nodes permitted in the output TIN. The default is 5 million.

Double
z_factor
(Optional)

The factor by which elevation values will be multiplied. This is typically used to convert Z linear units that match those of the XY linear units. The default is 1, which leaves elevation values unchanged.

Double

Code Sample

LasDatasetToTin example 1 (Python window)

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.LasDatasetToTin_3d('se_baltimore.lasd', 'se_bmore', 'RANDOM', 15, 3.28)
LasDatasetToTin example 2 (stand-alone script)

The following sample demonstrates the use of this tool in a stand-alone Python script:

'''**********************************************************************
Name: LAS Dataset to TIN Example
Description: Create a TIN using bare earth lidar measurements. This 
             script is designed for use as a script tool.
**********************************************************************'''
# Import system modules
import arcpy
import exceptions, sys, traceback

# Set Local Variables
lasD = arcpy.GetParameterAsText(0)
inLas = arcpy.GetParameterAsText(1) #input las files
surfCons = arcpy.GetParameterAsText(2) #input surface constraints
sr = arcpy.GetParameter(3) #spatial reference of las dataset
outTin = arcpy.GetParameterAsText(4)
thinningType = arcpy.GetParameterAsText(5)
thinningMethod = arcpy.GetParameterAsText(6)
thinningValue = arcpy.GetParameter(7)
zFactor = arcpy.GetParameter(8)

try:
    arcpy.CheckOutExtension('3D')
    # Execute CreateLasDataset
    arcpy.management.CreateLasDataset(inLas, lasD, 'RECURSION', surfCons, sr)
    lasLyr = arcpy.CreateUniqueName('lasdToTin', 'in_memory')
    classCode = 2
    returnValue = 'LAST'
    # Execute MakeLasDatasetLayer
    arcpy.management.MakeLasDatasetLayer(lasD, lasLyr, classCode, returnValue)
    # Define extent of the area of interest
    env.extent(1426057, 606477, 1449836, 623246)
    # Execute LasDatasetToTin
    arcpy.ddd.LasDatasetToTin(lasLyr, outTin, thinningType, 
                              thinningMethod, thinningValue, zFactor)
    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)

Environments

Licensing Information

ArcGIS for Desktop Basic: Requires 3D Analyst
ArcGIS for Desktop Standard: Requires 3D Analyst
ArcGIS for Desktop Advanced: Requires 3D Analyst
11/8/2012