tf_point_cloud_metadata

View as Markdown

Returns metadata for one or more las or laz point cloud/LiDAR files from a local file or directory source, optionally constraining the bounding box for metadata retrieved to the lon/lat bounding box specified by the x_min, x_max, y_min, y_max arguments.

Note: specified path must be contained in global allowed-import-paths, otherwise an error will be returned.

SELECT * FROM TABLE(
tf_point_cloud_metadata(
path => <path>,
[x_min => <x_min>,
x_max => <x_max>,
y_min => <y_min>,
y_max => <y_max>]
)
)

Input Arguments

ParameterDescriptionData Types
pathThe path of the file or directory containing the las/laz file or files. Can contain globs. Path must be in allowed-import-paths.TEXT ENCODING NONE
x_min (optional)Min x-coordinate value for point cloud files to retrieve metadata from.DOUBLE
x_max (optional)Max x-coordinate value for point cloud files to retrieve metadata from.DOUBLE
y_min (optional)Min y-coordinate value for point cloud files to retrieve metadata from.DOUBLE
y_max (optional)Max y-coordinate value for point cloud files to retrieve metadata from.DOUBLE

Output Columns

NameDescriptionData Types
file_pathFull path for the las or laz fileColumn<TEXT ENCODING DICT>
file_nameFilename for the las or laz fileColumn<TEXT ENCODING DICT>
file_source_idFile source id per file metadataColumn<SMALLINT>
version_majorLAS version major numberColumn<SMALLINT>
version_minorLAS version minor numberColumn<SMALLINT>
creation_yearData creation yearColumn<SMALLINT>
is_compressedWhether data is compressed, i.e. LAZ formatColumn<BOOLEAN>
num_pointsNumber of points in this fileColumn<BIGINT>
num_dimsNumber of data dimensions for this fileColumn<SMALLINT>
point_lenNot currently usedColumn<SMALLINT>
has_timeWhether data has time valueCOLUMN<BOOLEAN>
has_colorWhether data contains rgb color valueCOLUMN<BOOLEAN>
has_waveWhether data contains wave infoCOLUMN<BOOLEAN>
has_infraredWhether data contains infrared valueCOLUMN<BOOLEAN>
has_14_point_formatData adheres to 14-attribute standardCOLUMN<BOOLEAN>
specified_utm_zoneUTM zone of dataColumn<INT>
x_min_sourceMinimum x-coordinate in source projectionColumn<DOUBLE>
x_max_sourceMaximum x-coordinate in source projectionColumn<DOUBLE>
y_min_sourceMinimum y-coordinate in source projectionColumn<DOUBLE>
y_max_sourceMaximum y-coordinate in source projectionColumn<DOUBLE>
z_min_sourceMinimum z-coordinate in source projectionColumn<DOUBLE>
z_max_sourceMaximum z-coordinate in source projectionColumn<DOUBLE>
x_min_4326Minimum x-coordinate in lon/lat degreesColumn<DOUBLE>
x_max_4326Maximum x-coordinate in lon/lat degreesColumn<DOUBLE>
y_min_4326Minimum y-coordinate in lon/lat degreesColumn<DOUBLE>
y_max_4326Maximum y-coordinate in lon/lat degreesColumn<DOUBLE>
z_min_4326Minimum z-coordinate in meters above sea level (AMSL)Column<DOUBLE>
z_max_4326Maximum z-coordinate in meters above sea level (AMSL)Column<DOUBLE>

Example

SELECT
file_name,
num_points,
specified_utm_zone,
x_min_4326,
x_max_4326,
y_min_4326,
y_max_4326
FROM
TABLE(
tf_point_cloud_metadata(
path => '/home/todd/data/lidar/las_files/*2010_00000*.las'
)
)
ORDER BY
file_name;
file_name|num_points|specified_utm_zone|x_min_4326|x_max_4326|y_min_4326|y_max_4326
ARRA-CA_GoldenGate_2010_000001.las|2063102|10|-122.9943066785969|-122.9772226614453|37.97913478250298|37.99265200734278
ARRA-CA_GoldenGate_2010_000002.las|4755131|10|-122.9943056338411|-122.9772184796481|37.99265416515848|38.00617135784082
ARRA-CA_GoldenGate_2010_000003.las|4833631|10|-122.9943045883859|-122.9772142950517|38.00617351665583|38.01969067717678
ARRA-CA_GoldenGate_2010_000004.las|6518715|10|-122.9943035422309|-122.9772101076538|38.01969283699149|38.03320996534712
ARRA-CA_GoldenGate_2010_000005.las|7508919|10|-122.9943024953755|-122.9772059174526|38.03321212616189|38.04672922234828
ARRA-CA_GoldenGate_2010_000006.las|7442130|10|-122.9943014478193|-122.977201724446|38.04673138416345|38.06024844817669
ARRA-CA_GoldenGate_2010_000007.las|5610772|10|-122.9943003995618|-122.9771975286321|38.06025061099263|38.07376764282882
ARRA-CA_GoldenGate_2010_000008.las|3515095|10|-122.9942993506024|-122.9771933300088|38.07376980664591|38.08728680630115
ARRA-CA_GoldenGate_2010_000009.las|1689283|10|-122.9942898783015|-122.9771554156435|38.19544116402802|38.20895787388029