tf_load_point_cloud

Loads one or more las or laz point cloud/LiDAR files from a local file or directory source, optionally tranforming the output SRID to out_srs (if not specified, output points are automatically transformed to EPSG:4326 lon/lat pairs).

If use_cache is set to true, an internal point cloud-specific cache will be used to hold the results per input file, and if queried again will significantly speed up the query time, allowing for interactive querying of a point cloud source. If the results of tf_load_point_cloud will only be consumed once (for example, as part of a CREATE TABLE statement), it is highly recommended that use_cache is set to false or left unspecified (as it is defaulted to false) to avoid the performance and memory overhead incurred by used of the cache.

The bounds of the data retrieved can be optionally specified with the x_min, x_max, y_min, y_max arguments. These arguments can be useful when the user desires to retrieve a small geographic area from a large point-cloud file set, as files containing data outside the bounds of the specified bounding box will be quickly skipped by tf_load_point_cloud, only requiring a quick read of the spatial metadata for the file.

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

Input Arguments

Output Columns

Example A

CREATE TABLE wake_co_lidar_test AS
SELECT
  *
FROM
  TABLE(
    tf_load_point_cloud(
      path => '/path/to/20150118_LA_37_20066601.laz'
    )
  );

Example B

SELECT
  x, y, z, classification
FROM
  TABLE(
    tf_load_point_cloud(
      path => '/path/to/las_files/*.las',
      out_srs => 'EPSG:4326',
      use_cache => true,
      y_min => 37.0,
      y_max => 38.0,
      x_min => -123.0,
      x_max => -122.0
    )
  )