LAS 数据集属性 (arcpy)

摘要

Describe 函数将返回 LAS 数据集文件的以下属性。同时还支持文件属性数据集属性

LAS 数据集将返回 "LasDataset"dataType

属性

属性说明数据类型
constraintCount
(只读)

The number of surface constraint features referenced by the LAS dataset.

Long
fileCount
(只读)

The number of LAS files referenced by the LAS dataset.

Long
hasStatistics
(只读)

Indicates if statistics had been calculated for the LAS files referenced by the LAS dataset.

Boolean
needsUpdateStatistics
(只读)

Indicates if statistics are out-of-date or had not been calculated. Returns false if statistics are up-to-date.

Boolean
pointCount
(只读)

The number of data points in the LAS files referenced by the LAS dataset.

Long
usesRelativePath
(只读)

Indicates if the LAS dataset references its data elements using relative paths.

Boolean

代码实例

LAS Dataset properties example (stand-alone script)

The following script demonstrates the application of LAS dataset properties.

import arcpy

desc = arcpy.Describe(r'E:\GIS_Data\lidar\test_bmore.lasd')

if desc.usesRelativePath: 
    pathType = 'Relative'
else: pathType = 'Absolute'

# Determine state of statistics
if desc.needsUpdateStatistics:
    if desc.hasStatistics:
        statistics = 'Out-of-date'
    else:
        statistics = 'Missing'
else:
    statistics = 'Current'


print 'LAS Dataset Name: {0} \r'\
      'Point Count: {1} \r'\
      'Surface Constraint Count: {2} \r'\
      'Path Type: {3} \r'\
      'Statistics Status: {4}'.format(desc.basename, desc.pointCount, 
                                      desc.constraintCount, pathType,
                                      statistics)
9/15/2013