点文件信息 (3D Analyst)

许可等级:BasicStandardAdvanced

摘要

在面或多面体输出中生成有关一个或多个点文件的统计信息。

插图

Point file information output

用法

语法

PointFileInformation_3d (input, out_feature_class, in_file_type, {file_suffix}, {input_coordinate_system}, {folder_recursion}, {extrude_geometry}, {decimal_separator}, {summarize_by_class_code}, {improve_las_point_spacing})
参数说明数据类型
input
[input,...]

将被分析的一个或多个点数据文件或文件夹。

Folder; File
out_feature_class

输出要素类。

Feature Class
in_file_type

输入文件的格式。

  • LAS美国摄影测量及遥感协会 (ASPRS) 定义的航空激光雷达格式。
  • XYZXYZ 文件。
  • XYZIXYZI 文件。
  • GENERATEGENERATE 文件。
String
file_suffix
(可选)

在输入中指定文件夹时导入的文件的后缀。如果提供输入文件夹,则此参数为必填项。

String
input_coordinate_system
(可选)

输入数据的坐标系。

Coordinate System
folder_recursion
(可选)

当所选输入文件夹中的子文件夹含有数据时,扫描子文件夹。为文件夹结构中包含的每个文件生成一行输出要素类。

  • NO_RECURSION只有在输入文件夹中找到的数据才用于生成结果。这是默认设置。
  • RECURSION在输入文件夹及其子目录中找到的任何数据将用于生成结果。
Boolean
extrude_geometry
(可选)

指定是创建 2D 面要素类还是创建具有拉伸要素(可反映在每个文件中找到的高程范围)的多面体要素类。

  • NO_EXTRUSION输出将创建为 2D 面要素类。这是默认设置。
  • EXTRUSION输出将创建为多面体要素类。
Boolean
decimal_separator
(可选)

文本文件中用于区分数字的整数部分与其小数部分的小数分隔符。

  • DECIMAL_POINT点用作小数字符。这是默认设置。
  • DECIMAL_COMMA逗号用作小数字符。
String
summarize_by_class_code
(可选)

指定结果将按类代码还是 LAS 文件汇总 LAS 文件。

  • NO_ SUMMARIZE每个输出要素将表示在激光雷达文件中找到的所有类代码。这是默认设置。
  • SUMMARIZE每个输出要素将表示在激光雷达文件中找到的单个类代码。
Boolean
improve_las_point_spacing
(可选)

提供 LAS 文件中的点间距增强评估,可减少由不规则数据分布导致的过高评估。

  • LAS_SPACING规则点间距估计值用于 LAS 文件,其中范围由点数均分。这是默认设置。
  • NO_LAS_SPACING分组将用来获取 LAS 文件的更精确的点间距估计值。这可能增加工具的执行时间。
Boolean

代码实例

PointFileInformation 示例 1(Python 窗口)

下面的示例演示了如何在 Python 窗口中使用此工具:

import arcpy
from arcpy import env

arcpy.CheckOutExtension("3D")
env.workspace = "C:/data"
arcpy.PointFileInformation_3d(env.workspace, "Test.gdb/two_las", "LAS", "las", "Coordinate Systems/Projected Coordinate Systems/UTM/NAD 1983/NAD 1983 UTM Zone 17N.prj", True, True, "DECIMAL_POINT", True)
PointFileInformation 示例 2(独立脚本)

下面的示例演示了如何在独立 Python 脚本中使用此工具:

'''****************************************************************************
Name: PointFileInformation Example
Description: This script demonstrates how to use the 
             PointFileInformation tool to create an output file that contains
             all LAS files under a parent folder.
****************************************************************************'''
# Import system modules
import arcpy
from arcpy import env
import exceptions, sys, traceback

try:
    # Obtain a license for the ArcGIS 3D Analyst extension
    arcpy.CheckOutExtension("3D")
    # Set environment settings
    env.workspace = "C:/data"
    lidarList = arcpy.ListFiles("*.las")
    if lidarList:
        # Set Local Variables
        outputFC = "Test.gdb/output_las_info"
        prj = "Coordinate Systems/Geographic Coordinate Systems/World/WGS 1984.prj"
        extrudeGeom = True # Indicates whether to create extruded geometry shapes
        sumClass = True # Indicates whether to summarize output by class code
        decSep = "DECIMAL_POINT" # Identifies the decimal separator
        #Execute PointFileInformation
        arcpy.PointFileInformation_3d(lidarList, outputFC, "LAS", "las", prj, 
                                    "", extrudeGeom, decSep, sumClass)
        print "Finished executing Point File Information."
    else:
        print "There are no LAS files in {0}.".format(env.workspace)

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)

环境

相关主题

许可信息

ArcGIS for Desktop Basic:需要 3D Analyst
ArcGIS for Desktop Standard:需要 3D Analyst
ArcGIS for Desktop Advanced:需要 3D Analyst
9/15/2013